mod commands {
    use crate::cmd::{cmd, Cmd, Iter};
    use crate::connection::{Connection, ConnectionLike, Msg};
    use crate::pipeline::Pipeline;
    use crate::types::{
        ExistenceCheck, ExpireOption, Expiry, FromRedisValue, NumericBehavior,
        RedisResult, RedisWrite, SetExpiry, ToRedisArgs,
    };
    #[macro_use]
    mod macros {}
    #[cfg(feature = "geospatial")]
    use crate::geo;
    #[cfg(feature = "streams")]
    use crate::streams;
    #[cfg(feature = "acl")]
    use crate::acl;
    use crate::RedisConnectionInfo;
    /// Implements common redis commands for connection like objects.
    ///
    /// This allows you to send commands straight to a connection or client.
    /// It is also implemented for redis results of clients which makes for
    /// very convenient access in some basic cases.
    ///
    /// This allows you to use nicer syntax for some common operations.
    /// For instance this code:
    ///
    /// ```rust,no_run
    /// # fn do_something() -> redis::RedisResult<()> {
    /// let client = redis::Client::open("redis://127.0.0.1/")?;
    /// let mut con = client.get_connection()?;
    /// redis::cmd("SET").arg("my_key").arg(42).exec(&mut con).unwrap();
    /// assert_eq!(redis::cmd("GET").arg("my_key").query(&mut con), Ok(42));
    /// # Ok(()) }
    /// ```
    ///
    /// Will become this:
    ///
    /// ```rust,no_run
    /// # fn do_something() -> redis::RedisResult<()> {
    /// use redis::Commands;
    /// let client = redis::Client::open("redis://127.0.0.1/")?;
    /// let mut con = client.get_connection()?;
    /// let _: () = con.set("my_key", 42)?;
    /// assert_eq!(con.get("my_key"), Ok(42));
    /// # Ok(()) }
    /// ```
    pub trait Commands: ConnectionLike + Sized {
        /// Get the value of a key.  If key is a vec this becomes an `MGET`.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn get<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::get(key).query(self)
        }
        /// Get values of keys
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn mget<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::mget(key).query(self)
        }
        /// Gets all keys matching pattern
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn keys<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::keys(key).query(self)
        }
        /// Set the string value of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn set<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::set(key, value).query(self)
        }
        /// Set the string value of a key with options.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn set_options<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
            options: SetOptions,
        ) -> RedisResult<RV> {
            Cmd::set_options(key, value, options).query(self)
        }
        /// Sets multiple keys to their values.
        #[allow(deprecated)]
        #[deprecated(since = "0.22.4", note = "Renamed to mset() to reflect Redis name")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn set_multiple<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            items: &'a [(K, V)],
        ) -> RedisResult<RV> {
            Cmd::set_multiple(items).query(self)
        }
        /// Sets multiple keys to their values.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn mset<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            items: &'a [(K, V)],
        ) -> RedisResult<RV> {
            Cmd::mset(items).query(self)
        }
        /// Set the value and expiration of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn set_ex<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
            seconds: u64,
        ) -> RedisResult<RV> {
            Cmd::set_ex(key, value, seconds).query(self)
        }
        /// Set the value and expiration in milliseconds of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn pset_ex<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
            milliseconds: u64,
        ) -> RedisResult<RV> {
            Cmd::pset_ex(key, value, milliseconds).query(self)
        }
        /// Set the value of a key, only if the key does not exist
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn set_nx<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::set_nx(key, value).query(self)
        }
        /// Sets multiple keys to their values failing if at least one already exists.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn mset_nx<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            items: &'a [(K, V)],
        ) -> RedisResult<RV> {
            Cmd::mset_nx(items).query(self)
        }
        /// Set the string value of a key and return its old value.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn getset<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::getset(key, value).query(self)
        }
        /// Get a range of bytes/substring from the value of a key. Negative values provide an offset from the end of the value.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn getrange<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            from: isize,
            to: isize,
        ) -> RedisResult<RV> {
            Cmd::getrange(key, from, to).query(self)
        }
        /// Overwrite the part of the value stored in key at the specified offset.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn setrange<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            offset: isize,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::setrange(key, offset, value).query(self)
        }
        /// Delete one or more keys.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn del<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::del(key).query(self)
        }
        /// Determine if a key exists.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn exists<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::exists(key).query(self)
        }
        /// Determine the type of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn key_type<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::key_type(key).query(self)
        }
        /// Set a key's time to live in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn expire<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            seconds: i64,
        ) -> RedisResult<RV> {
            Cmd::expire(key, seconds).query(self)
        }
        /// Set the expiration for a key as a UNIX timestamp.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn expire_at<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            ts: i64,
        ) -> RedisResult<RV> {
            Cmd::expire_at(key, ts).query(self)
        }
        /// Set a key's time to live in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn pexpire<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            ms: i64,
        ) -> RedisResult<RV> {
            Cmd::pexpire(key, ms).query(self)
        }
        /// Set the expiration for a key as a UNIX timestamp in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn pexpire_at<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            ts: i64,
        ) -> RedisResult<RV> {
            Cmd::pexpire_at(key, ts).query(self)
        }
        /// Get the absolute Unix expiration timestamp in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn expire_time<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::expire_time(key).query(self)
        }
        /// Get the absolute Unix expiration timestamp in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn pexpire_time<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::pexpire_time(key).query(self)
        }
        /// Remove the expiration from a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn persist<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::persist(key).query(self)
        }
        /// Get the time to live for a key in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn ttl<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::ttl(key).query(self)
        }
        /// Get the time to live for a key in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn pttl<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::pttl(key).query(self)
        }
        /// Get the value of a key and set expiration
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn get_ex<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            expire_at: Expiry,
        ) -> RedisResult<RV> {
            Cmd::get_ex(key, expire_at).query(self)
        }
        /// Get the value of a key and delete it
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn get_del<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::get_del(key).query(self)
        }
        /// Rename a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn rename<'a, K: ToRedisArgs, N: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            new_key: N,
        ) -> RedisResult<RV> {
            Cmd::rename(key, new_key).query(self)
        }
        /// Rename a key, only if the new key does not exist.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn rename_nx<'a, K: ToRedisArgs, N: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            new_key: N,
        ) -> RedisResult<RV> {
            Cmd::rename_nx(key, new_key).query(self)
        }
        /// Unlink one or more keys.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn unlink<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::unlink(key).query(self)
        }
        /// Append a value to a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn append<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::append(key, value).query(self)
        }
        /// Increment the numeric value of a key by the given amount.  This
        /// issues a `INCRBY` or `INCRBYFLOAT` depending on the type.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn incr<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            delta: V,
        ) -> RedisResult<RV> {
            Cmd::incr(key, delta).query(self)
        }
        /// Decrement the numeric value of a key by the given amount.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn decr<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            delta: V,
        ) -> RedisResult<RV> {
            Cmd::decr(key, delta).query(self)
        }
        /// Sets or clears the bit at offset in the string value stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn setbit<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            offset: usize,
            value: bool,
        ) -> RedisResult<RV> {
            Cmd::setbit(key, offset, value).query(self)
        }
        /// Returns the bit value at offset in the string value stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn getbit<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            offset: usize,
        ) -> RedisResult<RV> {
            Cmd::getbit(key, offset).query(self)
        }
        /// Count set bits in a string.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn bitcount<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::bitcount(key).query(self)
        }
        /// Count set bits in a string in a range.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn bitcount_range<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            start: usize,
            end: usize,
        ) -> RedisResult<RV> {
            Cmd::bitcount_range(key, start, end).query(self)
        }
        /// Perform a bitwise AND between multiple keys (containing string values)
        /// and store the result in the destination key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn bit_and<'a, D: ToRedisArgs, S: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            srckeys: S,
        ) -> RedisResult<RV> {
            Cmd::bit_and(dstkey, srckeys).query(self)
        }
        /// Perform a bitwise OR between multiple keys (containing string values)
        /// and store the result in the destination key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn bit_or<'a, D: ToRedisArgs, S: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            srckeys: S,
        ) -> RedisResult<RV> {
            Cmd::bit_or(dstkey, srckeys).query(self)
        }
        /// Perform a bitwise XOR between multiple keys (containing string values)
        /// and store the result in the destination key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn bit_xor<'a, D: ToRedisArgs, S: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            srckeys: S,
        ) -> RedisResult<RV> {
            Cmd::bit_xor(dstkey, srckeys).query(self)
        }
        /// Perform a bitwise NOT of the key (containing string values)
        /// and store the result in the destination key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn bit_not<'a, D: ToRedisArgs, S: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            srckey: S,
        ) -> RedisResult<RV> {
            Cmd::bit_not(dstkey, srckey).query(self)
        }
        /// Get the length of the value stored in a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn strlen<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::strlen(key).query(self)
        }
        /// Gets a single (or multiple) fields from a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hget<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            field: F,
        ) -> RedisResult<RV> {
            Cmd::hget(key, field).query(self)
        }
        /// Deletes a single (or multiple) fields from a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hdel<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            field: F,
        ) -> RedisResult<RV> {
            Cmd::hdel(key, field).query(self)
        }
        /// Sets a single field in a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hset<'a, K: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            field: F,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::hset(key, field, value).query(self)
        }
        /// Sets a single field in a hash if it does not exist.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hset_nx<
            'a,
            K: ToRedisArgs,
            F: ToRedisArgs,
            V: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, field: F, value: V) -> RedisResult<RV> {
            Cmd::hset_nx(key, field, value).query(self)
        }
        /// Sets multiple fields in a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hset_multiple<
            'a,
            K: ToRedisArgs,
            F: ToRedisArgs,
            V: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, items: &'a [(F, V)]) -> RedisResult<RV> {
            Cmd::hset_multiple(key, items).query(self)
        }
        /// Increments a value.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hincr<'a, K: ToRedisArgs, F: ToRedisArgs, D: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            field: F,
            delta: D,
        ) -> RedisResult<RV> {
            Cmd::hincr(key, field, delta).query(self)
        }
        /// Checks if a field in a hash exists.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hexists<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            field: F,
        ) -> RedisResult<RV> {
            Cmd::hexists(key, field).query(self)
        }
        /// Get one or more fields' TTL in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn httl<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            fields: F,
        ) -> RedisResult<RV> {
            Cmd::httl(key, fields).query(self)
        }
        /// Get one or more fields' TTL in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hpttl<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            fields: F,
        ) -> RedisResult<RV> {
            Cmd::hpttl(key, fields).query(self)
        }
        /// Set one or more fields' time to live in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hexpire<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            seconds: i64,
            opt: ExpireOption,
            fields: F,
        ) -> RedisResult<RV> {
            Cmd::hexpire(key, seconds, opt, fields).query(self)
        }
        /// Set the expiration for one or more fields as a UNIX timestamp in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hexpire_at<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            ts: i64,
            opt: ExpireOption,
            fields: F,
        ) -> RedisResult<RV> {
            Cmd::hexpire_at(key, ts, opt, fields).query(self)
        }
        /// Returns the absolute Unix expiration timestamp in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hexpire_time<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            fields: F,
        ) -> RedisResult<RV> {
            Cmd::hexpire_time(key, fields).query(self)
        }
        /// Remove the expiration from a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hpersist<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            fields: F,
        ) -> RedisResult<RV> {
            Cmd::hpersist(key, fields).query(self)
        }
        /// Set one or more fields' time to live in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hpexpire<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            milliseconds: i64,
            opt: ExpireOption,
            fields: F,
        ) -> RedisResult<RV> {
            Cmd::hpexpire(key, milliseconds, opt, fields).query(self)
        }
        /// Set the expiration for one or more fields as a UNIX timestamp in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hpexpire_at<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            ts: i64,
            opt: ExpireOption,
            fields: F,
        ) -> RedisResult<RV> {
            Cmd::hpexpire_at(key, ts, opt, fields).query(self)
        }
        /// Returns the absolute Unix expiration timestamp in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hpexpire_time<'a, K: ToRedisArgs, F: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            fields: F,
        ) -> RedisResult<RV> {
            Cmd::hpexpire_time(key, fields).query(self)
        }
        /// Gets all the keys in a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hkeys<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::hkeys(key).query(self)
        }
        /// Gets all the values in a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hvals<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::hvals(key).query(self)
        }
        /// Gets all the fields and values in a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hgetall<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::hgetall(key).query(self)
        }
        /// Gets the length of a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn hlen<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::hlen(key).query(self)
        }
        /// Pop an element from a list, push it to another list
        /// and return it; or block until one is available
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn blmove<'a, S: ToRedisArgs, D: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            srckey: S,
            dstkey: D,
            src_dir: Direction,
            dst_dir: Direction,
            timeout: f64,
        ) -> RedisResult<RV> {
            Cmd::blmove(srckey, dstkey, src_dir, dst_dir, timeout).query(self)
        }
        /// Pops `count` elements from the first non-empty list key from the list of
        /// provided key names; or blocks until one is available.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn blmpop<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            timeout: f64,
            numkeys: usize,
            key: K,
            dir: Direction,
            count: usize,
        ) -> RedisResult<RV> {
            Cmd::blmpop(timeout, numkeys, key, dir, count).query(self)
        }
        /// Remove and get the first element in a list, or block until one is available.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn blpop<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            timeout: f64,
        ) -> RedisResult<RV> {
            Cmd::blpop(key, timeout).query(self)
        }
        /// Remove and get the last element in a list, or block until one is available.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn brpop<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            timeout: f64,
        ) -> RedisResult<RV> {
            Cmd::brpop(key, timeout).query(self)
        }
        /// Pop a value from a list, push it to another list and return it;
        /// or block until one is available.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn brpoplpush<'a, S: ToRedisArgs, D: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            srckey: S,
            dstkey: D,
            timeout: f64,
        ) -> RedisResult<RV> {
            Cmd::brpoplpush(srckey, dstkey, timeout).query(self)
        }
        /// Get an element from a list by its index.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn lindex<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            index: isize,
        ) -> RedisResult<RV> {
            Cmd::lindex(key, index).query(self)
        }
        /// Insert an element before another element in a list.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn linsert_before<
            'a,
            K: ToRedisArgs,
            P: ToRedisArgs,
            V: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, pivot: P, value: V) -> RedisResult<RV> {
            Cmd::linsert_before(key, pivot, value).query(self)
        }
        /// Insert an element after another element in a list.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn linsert_after<
            'a,
            K: ToRedisArgs,
            P: ToRedisArgs,
            V: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, pivot: P, value: V) -> RedisResult<RV> {
            Cmd::linsert_after(key, pivot, value).query(self)
        }
        /// Returns the length of the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn llen<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::llen(key).query(self)
        }
        /// Pop an element a list, push it to another list and return it
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn lmove<'a, S: ToRedisArgs, D: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            srckey: S,
            dstkey: D,
            src_dir: Direction,
            dst_dir: Direction,
        ) -> RedisResult<RV> {
            Cmd::lmove(srckey, dstkey, src_dir, dst_dir).query(self)
        }
        /// Pops `count` elements from the first non-empty list key from the list of
        /// provided key names.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn lmpop<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            numkeys: usize,
            key: K,
            dir: Direction,
            count: usize,
        ) -> RedisResult<RV> {
            Cmd::lmpop(numkeys, key, dir, count).query(self)
        }
        /// Removes and returns the up to `count` first elements of the list stored at key.
        ///
        /// If `count` is not specified, then defaults to first element.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn lpop<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            count: Option<core::num::NonZeroUsize>,
        ) -> RedisResult<RV> {
            Cmd::lpop(key, count).query(self)
        }
        /// Returns the index of the first matching value of the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn lpos<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
            options: LposOptions,
        ) -> RedisResult<RV> {
            Cmd::lpos(key, value, options).query(self)
        }
        /// Insert all the specified values at the head of the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn lpush<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::lpush(key, value).query(self)
        }
        /// Inserts a value at the head of the list stored at key, only if key
        /// already exists and holds a list.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn lpush_exists<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::lpush_exists(key, value).query(self)
        }
        /// Returns the specified elements of the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn lrange<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> RedisResult<RV> {
            Cmd::lrange(key, start, stop).query(self)
        }
        /// Removes the first count occurrences of elements equal to value
        /// from the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn lrem<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            count: isize,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::lrem(key, count, value).query(self)
        }
        /// Trim an existing list so that it will contain only the specified
        /// range of elements specified.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn ltrim<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> RedisResult<RV> {
            Cmd::ltrim(key, start, stop).query(self)
        }
        /// Sets the list element at index to value
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn lset<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            index: isize,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::lset(key, index, value).query(self)
        }
        /// Sends a ping to the server
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn ping<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::ping().query(self)
        }
        /// Sends a ping with a message to the server
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn ping_message<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            message: K,
        ) -> RedisResult<RV> {
            Cmd::ping_message(message).query(self)
        }
        /// Removes and returns the up to `count` last elements of the list stored at key
        ///
        /// If `count` is not specified, then defaults to last element.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn rpop<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            count: Option<core::num::NonZeroUsize>,
        ) -> RedisResult<RV> {
            Cmd::rpop(key, count).query(self)
        }
        /// Pop a value from a list, push it to another list and return it.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn rpoplpush<'a, K: ToRedisArgs, D: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            dstkey: D,
        ) -> RedisResult<RV> {
            Cmd::rpoplpush(key, dstkey).query(self)
        }
        /// Insert all the specified values at the tail of the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn rpush<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::rpush(key, value).query(self)
        }
        /// Inserts value at the tail of the list stored at key, only if key
        /// already exists and holds a list.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn rpush_exists<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            value: V,
        ) -> RedisResult<RV> {
            Cmd::rpush_exists(key, value).query(self)
        }
        /// Add one or more members to a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn sadd<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            member: M,
        ) -> RedisResult<RV> {
            Cmd::sadd(key, member).query(self)
        }
        /// Get the number of members in a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn scard<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::scard(key).query(self)
        }
        /// Subtract multiple sets.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn sdiff<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::sdiff(keys).query(self)
        }
        /// Subtract multiple sets and store the resulting set in a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn sdiffstore<'a, D: ToRedisArgs, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::sdiffstore(dstkey, keys).query(self)
        }
        /// Intersect multiple sets.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn sinter<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::sinter(keys).query(self)
        }
        /// Intersect multiple sets and store the resulting set in a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn sinterstore<'a, D: ToRedisArgs, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::sinterstore(dstkey, keys).query(self)
        }
        /// Determine if a given value is a member of a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn sismember<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            member: M,
        ) -> RedisResult<RV> {
            Cmd::sismember(key, member).query(self)
        }
        /// Determine if given values are members of a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn smismember<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            members: M,
        ) -> RedisResult<RV> {
            Cmd::smismember(key, members).query(self)
        }
        /// Get all the members in a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn smembers<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::smembers(key).query(self)
        }
        /// Move a member from one set to another.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn smove<'a, S: ToRedisArgs, D: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            srckey: S,
            dstkey: D,
            member: M,
        ) -> RedisResult<RV> {
            Cmd::smove(srckey, dstkey, member).query(self)
        }
        /// Remove and return a random member from a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn spop<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::spop(key).query(self)
        }
        /// Get one random member from a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn srandmember<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::srandmember(key).query(self)
        }
        /// Get multiple random members from a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn srandmember_multiple<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            count: usize,
        ) -> RedisResult<RV> {
            Cmd::srandmember_multiple(key, count).query(self)
        }
        /// Remove one or more members from a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn srem<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            member: M,
        ) -> RedisResult<RV> {
            Cmd::srem(key, member).query(self)
        }
        /// Add multiple sets.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn sunion<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::sunion(keys).query(self)
        }
        /// Add multiple sets and store the resulting set in a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn sunionstore<'a, D: ToRedisArgs, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::sunionstore(dstkey, keys).query(self)
        }
        /// Add one member to a sorted set, or update its score if it already exists.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zadd<'a, K: ToRedisArgs, S: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            member: M,
            score: S,
        ) -> RedisResult<RV> {
            Cmd::zadd(key, member, score).query(self)
        }
        /// Add multiple members to a sorted set, or update its score if it already exists.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zadd_multiple<
            'a,
            K: ToRedisArgs,
            S: ToRedisArgs,
            M: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, items: &'a [(S, M)]) -> RedisResult<RV> {
            Cmd::zadd_multiple(key, items).query(self)
        }
        /// Get the number of members in a sorted set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zcard<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::zcard(key).query(self)
        }
        /// Count the members in a sorted set with scores within the given values.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zcount<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, min: M, max: MM) -> RedisResult<RV> {
            Cmd::zcount(key, min, max).query(self)
        }
        /// Increments the member in a sorted set at key by delta.
        /// If the member does not exist, it is added with delta as its score.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zincr<'a, K: ToRedisArgs, M: ToRedisArgs, D: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            member: M,
            delta: D,
        ) -> RedisResult<RV> {
            Cmd::zincr(key, member, delta).query(self)
        }
        /// Intersect multiple sorted sets and store the resulting sorted set in
        /// a new key using SUM as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zinterstore<'a, D: ToRedisArgs, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::zinterstore(dstkey, keys).query(self)
        }
        /// Intersect multiple sorted sets and store the resulting sorted set in
        /// a new key using MIN as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zinterstore_min<'a, D: ToRedisArgs, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::zinterstore_min(dstkey, keys).query(self)
        }
        /// Intersect multiple sorted sets and store the resulting sorted set in
        /// a new key using MAX as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zinterstore_max<'a, D: ToRedisArgs, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::zinterstore_max(dstkey, keys).query(self)
        }
        /// [Commands::zinterstore], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zinterstore_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, dstkey: D, keys: &'a [(K, W)]) -> RedisResult<RV> {
            Cmd::zinterstore_weights(dstkey, keys).query(self)
        }
        /// [Commands::zinterstore_min], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zinterstore_min_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, dstkey: D, keys: &'a [(K, W)]) -> RedisResult<RV> {
            Cmd::zinterstore_min_weights(dstkey, keys).query(self)
        }
        /// [Commands::zinterstore_max], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zinterstore_max_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, dstkey: D, keys: &'a [(K, W)]) -> RedisResult<RV> {
            Cmd::zinterstore_max_weights(dstkey, keys).query(self)
        }
        /// Count the number of members in a sorted set between a given lexicographical range.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zlexcount<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, min: M, max: MM) -> RedisResult<RV> {
            Cmd::zlexcount(key, min, max).query(self)
        }
        /// Removes and returns the member with the highest score in a sorted set.
        /// Blocks until a member is available otherwise.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn bzpopmax<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            timeout: f64,
        ) -> RedisResult<RV> {
            Cmd::bzpopmax(key, timeout).query(self)
        }
        /// Removes and returns up to count members with the highest scores in a sorted set
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zpopmax<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::zpopmax(key, count).query(self)
        }
        /// Removes and returns the member with the lowest score in a sorted set.
        /// Blocks until a member is available otherwise.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn bzpopmin<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            timeout: f64,
        ) -> RedisResult<RV> {
            Cmd::bzpopmin(key, timeout).query(self)
        }
        /// Removes and returns up to count members with the lowest scores in a sorted set
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zpopmin<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::zpopmin(key, count).query(self)
        }
        /// Removes and returns up to count members with the highest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        /// Blocks until a member is available otherwise.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn bzmpop_max<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            timeout: f64,
            keys: K,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::bzmpop_max(timeout, keys, count).query(self)
        }
        /// Removes and returns up to count members with the highest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zmpop_max<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            keys: K,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::zmpop_max(keys, count).query(self)
        }
        /// Removes and returns up to count members with the lowest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        /// Blocks until a member is available otherwise.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn bzmpop_min<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            timeout: f64,
            keys: K,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::bzmpop_min(timeout, keys, count).query(self)
        }
        /// Removes and returns up to count members with the lowest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zmpop_min<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            keys: K,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::zmpop_min(keys, count).query(self)
        }
        /// Return up to count random members in a sorted set (or 1 if `count == None`)
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrandmember<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            count: Option<isize>,
        ) -> RedisResult<RV> {
            Cmd::zrandmember(key, count).query(self)
        }
        /// Return up to count random members in a sorted set with scores
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrandmember_withscores<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::zrandmember_withscores(key, count).query(self)
        }
        /// Return a range of members in a sorted set, by index
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrange<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> RedisResult<RV> {
            Cmd::zrange(key, start, stop).query(self)
        }
        /// Return a range of members in a sorted set, by index with scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrange_withscores<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> RedisResult<RV> {
            Cmd::zrange_withscores(key, start, stop).query(self)
        }
        /// Return a range of members in a sorted set, by lexicographical range.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrangebylex<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, min: M, max: MM) -> RedisResult<RV> {
            Cmd::zrangebylex(key, min, max).query(self)
        }
        /// Return a range of members in a sorted set, by lexicographical
        /// range with offset and limit.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrangebylex_limit<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            min: M,
            max: MM,
            offset: isize,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::zrangebylex_limit(key, min, max, offset, count).query(self)
        }
        /// Return a range of members in a sorted set, by lexicographical range.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrevrangebylex<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, max: MM, min: M) -> RedisResult<RV> {
            Cmd::zrevrangebylex(key, max, min).query(self)
        }
        /// Return a range of members in a sorted set, by lexicographical
        /// range with offset and limit.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrevrangebylex_limit<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            max: MM,
            min: M,
            offset: isize,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::zrevrangebylex_limit(key, max, min, offset, count).query(self)
        }
        /// Return a range of members in a sorted set, by score.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrangebyscore<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, min: M, max: MM) -> RedisResult<RV> {
            Cmd::zrangebyscore(key, min, max).query(self)
        }
        /// Return a range of members in a sorted set, by score with scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrangebyscore_withscores<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, min: M, max: MM) -> RedisResult<RV> {
            Cmd::zrangebyscore_withscores(key, min, max).query(self)
        }
        /// Return a range of members in a sorted set, by score with limit.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrangebyscore_limit<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            min: M,
            max: MM,
            offset: isize,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::zrangebyscore_limit(key, min, max, offset, count).query(self)
        }
        /// Return a range of members in a sorted set, by score with limit with scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrangebyscore_limit_withscores<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            min: M,
            max: MM,
            offset: isize,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::zrangebyscore_limit_withscores(key, min, max, offset, count).query(self)
        }
        /// Determine the index of a member in a sorted set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrank<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            member: M,
        ) -> RedisResult<RV> {
            Cmd::zrank(key, member).query(self)
        }
        /// Remove one or more members from a sorted set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrem<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            members: M,
        ) -> RedisResult<RV> {
            Cmd::zrem(key, members).query(self)
        }
        /// Remove all members in a sorted set between the given lexicographical range.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrembylex<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, min: M, max: MM) -> RedisResult<RV> {
            Cmd::zrembylex(key, min, max).query(self)
        }
        /// Remove all members in a sorted set within the given indexes.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zremrangebyrank<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> RedisResult<RV> {
            Cmd::zremrangebyrank(key, start, stop).query(self)
        }
        /// Remove all members in a sorted set within the given scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrembyscore<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, min: M, max: MM) -> RedisResult<RV> {
            Cmd::zrembyscore(key, min, max).query(self)
        }
        /// Return a range of members in a sorted set, by index, with scores
        /// ordered from high to low.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrevrange<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> RedisResult<RV> {
            Cmd::zrevrange(key, start, stop).query(self)
        }
        /// Return a range of members in a sorted set, by index, with scores
        /// ordered from high to low.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrevrange_withscores<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> RedisResult<RV> {
            Cmd::zrevrange_withscores(key, start, stop).query(self)
        }
        /// Return a range of members in a sorted set, by score.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrevrangebyscore<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, max: MM, min: M) -> RedisResult<RV> {
            Cmd::zrevrangebyscore(key, max, min).query(self)
        }
        /// Return a range of members in a sorted set, by score with scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrevrangebyscore_withscores<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, max: MM, min: M) -> RedisResult<RV> {
            Cmd::zrevrangebyscore_withscores(key, max, min).query(self)
        }
        /// Return a range of members in a sorted set, by score with limit.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrevrangebyscore_limit<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            max: MM,
            min: M,
            offset: isize,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::zrevrangebyscore_limit(key, max, min, offset, count).query(self)
        }
        /// Return a range of members in a sorted set, by score with limit with scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrevrangebyscore_limit_withscores<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            max: MM,
            min: M,
            offset: isize,
            count: isize,
        ) -> RedisResult<RV> {
            Cmd::zrevrangebyscore_limit_withscores(key, max, min, offset, count)
                .query(self)
        }
        /// Determine the index of a member in a sorted set, with scores ordered from high to low.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zrevrank<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            member: M,
        ) -> RedisResult<RV> {
            Cmd::zrevrank(key, member).query(self)
        }
        /// Get the score associated with the given member in a sorted set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zscore<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            member: M,
        ) -> RedisResult<RV> {
            Cmd::zscore(key, member).query(self)
        }
        /// Get the scores associated with multiple members in a sorted set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zscore_multiple<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            members: &'a [M],
        ) -> RedisResult<RV> {
            Cmd::zscore_multiple(key, members).query(self)
        }
        /// Unions multiple sorted sets and store the resulting sorted set in
        /// a new key using SUM as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zunionstore<'a, D: ToRedisArgs, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::zunionstore(dstkey, keys).query(self)
        }
        /// Unions multiple sorted sets and store the resulting sorted set in
        /// a new key using MIN as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zunionstore_min<'a, D: ToRedisArgs, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::zunionstore_min(dstkey, keys).query(self)
        }
        /// Unions multiple sorted sets and store the resulting sorted set in
        /// a new key using MAX as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zunionstore_max<'a, D: ToRedisArgs, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> RedisResult<RV> {
            Cmd::zunionstore_max(dstkey, keys).query(self)
        }
        /// [Commands::zunionstore], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zunionstore_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, dstkey: D, keys: &'a [(K, W)]) -> RedisResult<RV> {
            Cmd::zunionstore_weights(dstkey, keys).query(self)
        }
        /// [Commands::zunionstore_min], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zunionstore_min_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, dstkey: D, keys: &'a [(K, W)]) -> RedisResult<RV> {
            Cmd::zunionstore_min_weights(dstkey, keys).query(self)
        }
        /// [Commands::zunionstore_max], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn zunionstore_max_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, dstkey: D, keys: &'a [(K, W)]) -> RedisResult<RV> {
            Cmd::zunionstore_max_weights(dstkey, keys).query(self)
        }
        /// Adds the specified elements to the specified HyperLogLog.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn pfadd<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            element: E,
        ) -> RedisResult<RV> {
            Cmd::pfadd(key, element).query(self)
        }
        /// Return the approximated cardinality of the set(s) observed by the
        /// HyperLogLog at key(s).
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn pfcount<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::pfcount(key).query(self)
        }
        /// Merge N different HyperLogLogs into a single one.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn pfmerge<'a, D: ToRedisArgs, S: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            dstkey: D,
            srckeys: S,
        ) -> RedisResult<RV> {
            Cmd::pfmerge(dstkey, srckeys).query(self)
        }
        /// Posts a message to the given channel.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn publish<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            channel: K,
            message: E,
        ) -> RedisResult<RV> {
            Cmd::publish(channel, message).query(self)
        }
        /// Posts a message to the given sharded channel.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn spublish<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            channel: K,
            message: E,
        ) -> RedisResult<RV> {
            Cmd::spublish(channel, message).query(self)
        }
        /// Returns the encoding of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn object_encoding<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::object_encoding(key).query(self)
        }
        /// Returns the time in seconds since the last access of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn object_idletime<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::object_idletime(key).query(self)
        }
        /// Returns the logarithmic access frequency counter of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn object_freq<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::object_freq(key).query(self)
        }
        /// Returns the reference count of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn object_refcount<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::object_refcount(key).query(self)
        }
        /// Returns the name of the current connection as set by CLIENT SETNAME.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn client_getname<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::client_getname().query(self)
        }
        /// Returns the ID of the current connection.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn client_id<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::client_id().query(self)
        }
        /// Command assigns a name to the current connection.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn client_setname<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            connection_name: K,
        ) -> RedisResult<RV> {
            Cmd::client_setname(connection_name).query(self)
        }
        /// When Redis is configured to use an ACL file (with the aclfile
        /// configuration option), this command will reload the ACLs from the file,
        /// replacing all the current ACL rules with the ones defined in the file.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_load<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::acl_load().query(self)
        }
        /// When Redis is configured to use an ACL file (with the aclfile
        /// configuration option), this command will save the currently defined
        /// ACLs from the server memory to the ACL file.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_save<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::acl_save().query(self)
        }
        /// Shows the currently active ACL rules in the Redis server.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_list<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::acl_list().query(self)
        }
        /// Shows a list of all the usernames of the currently configured users in
        /// the Redis ACL system.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_users<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::acl_users().query(self)
        }
        /// Returns all the rules defined for an existing ACL user.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_getuser<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            username: K,
        ) -> RedisResult<RV> {
            Cmd::acl_getuser(username).query(self)
        }
        /// Creates an ACL user without any privilege.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_setuser<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            username: K,
        ) -> RedisResult<RV> {
            Cmd::acl_setuser(username).query(self)
        }
        /// Creates an ACL user with the specified rules or modify the rules of
        /// an existing user.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_setuser_rules<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            username: K,
            rules: &'a [acl::Rule],
        ) -> RedisResult<RV> {
            Cmd::acl_setuser_rules(username, rules).query(self)
        }
        /// Delete all the specified ACL users and terminate all the connections
        /// that are authenticated with such users.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_deluser<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            usernames: &'a [K],
        ) -> RedisResult<RV> {
            Cmd::acl_deluser(usernames).query(self)
        }
        /// Simulate the execution of a given command by a given user.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_dryrun<
            'a,
            K: ToRedisArgs,
            C: ToRedisArgs,
            A: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, username: K, command: C, args: A) -> RedisResult<RV> {
            Cmd::acl_dryrun(username, command, args).query(self)
        }
        /// Shows the available ACL categories.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_cat<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::acl_cat().query(self)
        }
        /// Shows all the Redis commands in the specified category.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_cat_categoryname<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            categoryname: K,
        ) -> RedisResult<RV> {
            Cmd::acl_cat_categoryname(categoryname).query(self)
        }
        /// Generates a 256-bits password starting from /dev/urandom if available.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_genpass<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::acl_genpass().query(self)
        }
        /// Generates a 1-to-1024-bits password starting from /dev/urandom if available.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_genpass_bits<'a, RV: FromRedisValue>(
            &mut self,
            bits: isize,
        ) -> RedisResult<RV> {
            Cmd::acl_genpass_bits(bits).query(self)
        }
        /// Returns the username the current connection is authenticated with.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_whoami<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::acl_whoami().query(self)
        }
        /// Shows a list of recent ACL security events
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_log<'a, RV: FromRedisValue>(&mut self, count: isize) -> RedisResult<RV> {
            Cmd::acl_log(count).query(self)
        }
        /// Clears the ACL log.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_log_reset<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::acl_log_reset().query(self)
        }
        /// Returns a helpful text describing the different subcommands.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn acl_help<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV> {
            Cmd::acl_help().query(self)
        }
        /// Adds the specified geospatial items to the specified key.
        ///
        /// Every member has to be written as a tuple of `(longitude, latitude,
        /// member_name)`. It can be a single tuple, or a vector of tuples.
        ///
        /// `longitude, latitude` can be set using [redis::geo::Coord][1].
        ///
        /// [1]: ./geo/struct.Coord.html
        ///
        /// Returns the number of elements added to the sorted set, not including
        /// elements already existing for which the score was updated.
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, Connection, RedisResult};
        /// use redis::geo::Coord;
        ///
        /// fn add_point(con: &mut Connection) -> RedisResult<isize> {
        ///     con.geo_add("my_gis", (Coord::lon_lat(13.361389, 38.115556), "Palermo"))
        /// }
        ///
        /// fn add_point_with_tuples(con: &mut Connection) -> RedisResult<isize> {
        ///     con.geo_add("my_gis", ("13.361389", "38.115556", "Palermo"))
        /// }
        ///
        /// fn add_many_points(con: &mut Connection) -> RedisResult<isize> {
        ///     con.geo_add("my_gis", &[
        ///         ("13.361389", "38.115556", "Palermo"),
        ///         ("15.087269", "37.502669", "Catania")
        ///     ])
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn geo_add<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            members: M,
        ) -> RedisResult<RV> {
            Cmd::geo_add(key, members).query(self)
        }
        /// Return the distance between two members in the geospatial index
        /// represented by the sorted set.
        ///
        /// If one or both the members are missing, the command returns NULL, so
        /// it may be convenient to parse its response as either `Option<f64>` or
        /// `Option<String>`.
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        /// use redis::geo::Unit;
        ///
        /// fn get_dists(con: &mut redis::Connection) {
        ///     let x: RedisResult<f64> = con.geo_dist(
        ///         "my_gis",
        ///         "Palermo",
        ///         "Catania",
        ///         Unit::Kilometers
        ///     );
        ///     // x is Ok(166.2742)
        ///
        ///     let x: RedisResult<Option<f64>> = con.geo_dist(
        ///         "my_gis",
        ///         "Palermo",
        ///         "Atlantis",
        ///         Unit::Meters
        ///     );
        ///     // x is Ok(None)
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn geo_dist<
            'a,
            K: ToRedisArgs,
            M1: ToRedisArgs,
            M2: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            member1: M1,
            member2: M2,
            unit: geo::Unit,
        ) -> RedisResult<RV> {
            Cmd::geo_dist(key, member1, member2, unit).query(self)
        }
        /// Return valid [Geohash][1] strings representing the position of one or
        /// more members of the geospatial index represented by the sorted set at
        /// key.
        ///
        /// [1]: https://en.wikipedia.org/wiki/Geohash
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        ///
        /// fn get_hash(con: &mut redis::Connection) {
        ///     let x: RedisResult<Vec<String>> = con.geo_hash("my_gis", "Palermo");
        ///     // x is vec!["sqc8b49rny0"]
        ///
        ///     let x: RedisResult<Vec<String>> = con.geo_hash("my_gis", &["Palermo", "Catania"]);
        ///     // x is vec!["sqc8b49rny0", "sqdtr74hyu0"]
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn geo_hash<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            members: M,
        ) -> RedisResult<RV> {
            Cmd::geo_hash(key, members).query(self)
        }
        /// Return the positions of all the specified members of the geospatial
        /// index represented by the sorted set at key.
        ///
        /// Every position is a pair of `(longitude, latitude)`. [redis::geo::Coord][1]
        /// can be used to convert these value in a struct.
        ///
        /// [1]: ./geo/struct.Coord.html
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        /// use redis::geo::Coord;
        ///
        /// fn get_position(con: &mut redis::Connection) {
        ///     let x: RedisResult<Vec<Vec<f64>>> = con.geo_pos("my_gis", &["Palermo", "Catania"]);
        ///     // x is [ [ 13.361389, 38.115556 ], [ 15.087269, 37.502669 ] ];
        ///
        ///     let x: Vec<Coord<f64>> = con.geo_pos("my_gis", "Palermo").unwrap();
        ///     // x[0].longitude is 13.361389
        ///     // x[0].latitude is 38.115556
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn geo_pos<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            members: M,
        ) -> RedisResult<RV> {
            Cmd::geo_pos(key, members).query(self)
        }
        /// Return the members of a sorted set populated with geospatial information
        /// using [geo_add](#method.geo_add), which are within the borders of the area
        /// specified with the center location and the maximum distance from the center
        /// (the radius).
        ///
        /// Every item in the result can be read with [redis::geo::RadiusSearchResult][1],
        /// which support the multiple formats returned by `GEORADIUS`.
        ///
        /// [1]: ./geo/struct.RadiusSearchResult.html
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        /// use redis::geo::{RadiusOptions, RadiusSearchResult, RadiusOrder, Unit};
        ///
        /// fn radius(con: &mut redis::Connection) -> Vec<RadiusSearchResult> {
        ///     let opts = RadiusOptions::default().with_dist().order(RadiusOrder::Asc);
        ///     con.geo_radius("my_gis", 15.90, 37.21, 51.39, Unit::Kilometers, opts).unwrap()
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn geo_radius<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            longitude: f64,
            latitude: f64,
            radius: f64,
            unit: geo::Unit,
            options: geo::RadiusOptions,
        ) -> RedisResult<RV> {
            Cmd::geo_radius(key, longitude, latitude, radius, unit, options).query(self)
        }
        /// Retrieve members selected by distance with the center of `member`. The
        /// member itself is always contained in the results.
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn geo_radius_by_member<'a, K: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            member: M,
            radius: f64,
            unit: geo::Unit,
            options: geo::RadiusOptions,
        ) -> RedisResult<RV> {
            Cmd::geo_radius_by_member(key, member, radius, unit, options).query(self)
        }
        /// Ack pending stream messages checked out by a consumer.
        ///
        /// ```text
        /// XACK <key> <group> <id> <id> ... <id>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xack<'a, K: ToRedisArgs, G: ToRedisArgs, I: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            group: G,
            ids: &'a [I],
        ) -> RedisResult<RV> {
            Cmd::xack(key, group, ids).query(self)
        }
        /// Add a stream message by `key`. Use `*` as the `id` for the current timestamp.
        ///
        /// ```text
        /// XADD key <ID or *> [field value] [field value] ...
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xadd<
            'a,
            K: ToRedisArgs,
            ID: ToRedisArgs,
            F: ToRedisArgs,
            V: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, id: ID, items: &'a [(F, V)]) -> RedisResult<RV> {
            Cmd::xadd(key, id, items).query(self)
        }
        /// BTreeMap variant for adding a stream message by `key`.
        /// Use `*` as the `id` for the current timestamp.
        ///
        /// ```text
        /// XADD key <ID or *> [rust BTreeMap] ...
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xadd_map<
            'a,
            K: ToRedisArgs,
            ID: ToRedisArgs,
            BTM: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, id: ID, map: BTM) -> RedisResult<RV> {
            Cmd::xadd_map(key, id, map).query(self)
        }
        /// Add a stream message with options.
        ///
        /// Items can be any list type, e.g.
        /// ```rust
        /// // static items
        /// let items = &[("key", "val"), ("key2", "val2")];
        /// # use std::collections::BTreeMap;
        /// // A map (Can be BTreeMap, HashMap, etc)
        /// let mut map: BTreeMap<&str, &str> = BTreeMap::new();
        /// map.insert("ab", "cd");
        /// map.insert("ef", "gh");
        /// map.insert("ij", "kl");
        /// ```
        ///
        /// ```text
        /// XADD key [NOMKSTREAM] [<MAXLEN|MINID> [~|=] threshold [LIMIT count]] <* | ID> field value [field value] ...
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xadd_options<
            'a,
            K: ToRedisArgs,
            ID: ToRedisArgs,
            I: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            id: ID,
            items: I,
            options: &'a streams::StreamAddOptions,
        ) -> RedisResult<RV> {
            Cmd::xadd_options(key, id, items, options).query(self)
        }
        /// Add a stream message while capping the stream at a maxlength.
        ///
        /// ```text
        /// XADD key [MAXLEN [~|=] <count>] <ID or *> [field value] [field value] ...
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xadd_maxlen<
            'a,
            K: ToRedisArgs,
            ID: ToRedisArgs,
            F: ToRedisArgs,
            V: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            maxlen: streams::StreamMaxlen,
            id: ID,
            items: &'a [(F, V)],
        ) -> RedisResult<RV> {
            Cmd::xadd_maxlen(key, maxlen, id, items).query(self)
        }
        /// BTreeMap variant for adding a stream message while capping the stream at a maxlength.
        ///
        /// ```text
        /// XADD key [MAXLEN [~|=] <count>] <ID or *> [rust BTreeMap] ...
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xadd_maxlen_map<
            'a,
            K: ToRedisArgs,
            ID: ToRedisArgs,
            BTM: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            maxlen: streams::StreamMaxlen,
            id: ID,
            map: BTM,
        ) -> RedisResult<RV> {
            Cmd::xadd_maxlen_map(key, maxlen, id, map).query(self)
        }
        /// Perform a combined xpending and xclaim flow.
        ///
        /// ```no_run
        /// use redis::{Connection,Commands,RedisResult};
        /// use redis::streams::{StreamAutoClaimOptions, StreamAutoClaimReply};
        /// let client = redis::Client::open("redis://127.0.0.1/0").unwrap();
        /// let mut con = client.get_connection().unwrap();
        ///
        /// let opts = StreamAutoClaimOptions::default();
        /// let results : RedisResult<StreamAutoClaimReply> = con.xautoclaim_options("k1", "g1", "c1", 10, "0-0", opts);
        /// ```
        ///
        /// ```text
        /// XAUTOCLAIM <key> <group> <consumer> <min-idle-time> <start> [COUNT <count>] [JUSTID]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xautoclaim_options<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            C: ToRedisArgs,
            MIT: ToRedisArgs,
            S: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            group: G,
            consumer: C,
            min_idle_time: MIT,
            start: S,
            options: streams::StreamAutoClaimOptions,
        ) -> RedisResult<RV> {
            Cmd::xautoclaim_options(key, group, consumer, min_idle_time, start, options)
                .query(self)
        }
        /// Claim pending, unacked messages, after some period of time,
        /// currently checked out by another consumer.
        ///
        /// This method only accepts the must-have arguments for claiming messages.
        /// If optional arguments are required, see `xclaim_options` below.
        ///
        /// ```text
        /// XCLAIM <key> <group> <consumer> <min-idle-time> [<ID-1> <ID-2>]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xclaim<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            C: ToRedisArgs,
            MIT: ToRedisArgs,
            ID: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            group: G,
            consumer: C,
            min_idle_time: MIT,
            ids: &'a [ID],
        ) -> RedisResult<RV> {
            Cmd::xclaim(key, group, consumer, min_idle_time, ids).query(self)
        }
        /// This is the optional arguments version for claiming unacked, pending messages
        /// currently checked out by another consumer.
        ///
        /// ```no_run
        /// use redis::{Connection,Commands,RedisResult};
        /// use redis::streams::{StreamClaimOptions,StreamClaimReply};
        /// let client = redis::Client::open("redis://127.0.0.1/0").unwrap();
        /// let mut con = client.get_connection().unwrap();
        ///
        /// // Claim all pending messages for key "k1",
        /// // from group "g1", checked out by consumer "c1"
        /// // for 10ms with RETRYCOUNT 2 and FORCE
        ///
        /// let opts = StreamClaimOptions::default()
        ///     .with_force()
        ///     .retry(2);
        /// let results: RedisResult<StreamClaimReply> =
        ///     con.xclaim_options("k1", "g1", "c1", 10, &["0"], opts);
        ///
        /// // All optional arguments return a `Result<StreamClaimReply>` with one exception:
        /// // Passing JUSTID returns only the message `id` and omits the HashMap for each message.
        ///
        /// let opts = StreamClaimOptions::default()
        ///     .with_justid();
        /// let results: RedisResult<Vec<String>> =
        ///     con.xclaim_options("k1", "g1", "c1", 10, &["0"], opts);
        /// ```
        ///
        /// ```text
        /// XCLAIM <key> <group> <consumer> <min-idle-time> <ID-1> <ID-2>
        ///     [IDLE <milliseconds>] [TIME <mstime>] [RETRYCOUNT <count>]
        ///     [FORCE] [JUSTID] [LASTID <lastid>]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xclaim_options<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            C: ToRedisArgs,
            MIT: ToRedisArgs,
            ID: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            group: G,
            consumer: C,
            min_idle_time: MIT,
            ids: &'a [ID],
            options: streams::StreamClaimOptions,
        ) -> RedisResult<RV> {
            Cmd::xclaim_options(key, group, consumer, min_idle_time, ids, options)
                .query(self)
        }
        /// Deletes a list of `id`s for a given stream `key`.
        ///
        /// ```text
        /// XDEL <key> [<ID1> <ID2> ... <IDN>]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xdel<'a, K: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            ids: &'a [ID],
        ) -> RedisResult<RV> {
            Cmd::xdel(key, ids).query(self)
        }
        /// This command is used for creating a consumer `group`. It expects the stream key
        /// to already exist. Otherwise, use `xgroup_create_mkstream` if it doesn't.
        /// The `id` is the starting message id all consumers should read from. Use `$` If you want
        /// all consumers to read from the last message added to stream.
        ///
        /// ```text
        /// XGROUP CREATE <key> <groupname> <id or $>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xgroup_create<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            ID: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, group: G, id: ID) -> RedisResult<RV> {
            Cmd::xgroup_create(key, group, id).query(self)
        }
        /// This creates a `consumer` explicitly (vs implicit via XREADGROUP)
        /// for given stream `key.
        ///
        /// The return value is either a 0 or a 1 for the number of consumers created
        /// 0 means the consumer already exists
        ///
        /// ```text
        /// XGROUP CREATECONSUMER <key> <groupname> <consumername>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xgroup_createconsumer<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            C: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, group: G, consumer: C) -> RedisResult<RV> {
            Cmd::xgroup_createconsumer(key, group, consumer).query(self)
        }
        /// This is the alternate version for creating a consumer `group`
        /// which makes the stream if it doesn't exist.
        ///
        /// ```text
        /// XGROUP CREATE <key> <groupname> <id or $> [MKSTREAM]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xgroup_create_mkstream<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            ID: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, group: G, id: ID) -> RedisResult<RV> {
            Cmd::xgroup_create_mkstream(key, group, id).query(self)
        }
        /// Alter which `id` you want consumers to begin reading from an existing
        /// consumer `group`.
        ///
        /// ```text
        /// XGROUP SETID <key> <groupname> <id or $>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xgroup_setid<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            ID: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, group: G, id: ID) -> RedisResult<RV> {
            Cmd::xgroup_setid(key, group, id).query(self)
        }
        /// Destroy an existing consumer `group` for a given stream `key`
        ///
        /// ```text
        /// XGROUP SETID <key> <groupname> <id or $>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xgroup_destroy<'a, K: ToRedisArgs, G: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            group: G,
        ) -> RedisResult<RV> {
            Cmd::xgroup_destroy(key, group).query(self)
        }
        /// This deletes a `consumer` from an existing consumer `group`
        /// for given stream `key.
        ///
        /// ```text
        /// XGROUP DELCONSUMER <key> <groupname> <consumername>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xgroup_delconsumer<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            C: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, group: G, consumer: C) -> RedisResult<RV> {
            Cmd::xgroup_delconsumer(key, group, consumer).query(self)
        }
        /// This returns all info details about
        /// which consumers have read messages for given consumer `group`.
        /// Take note of the StreamInfoConsumersReply return type.
        ///
        /// *It's possible this return value might not contain new fields
        /// added by Redis in future versions.*
        ///
        /// ```text
        /// XINFO CONSUMERS <key> <group>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xinfo_consumers<'a, K: ToRedisArgs, G: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            group: G,
        ) -> RedisResult<RV> {
            Cmd::xinfo_consumers(key, group).query(self)
        }
        /// Returns all consumer `group`s created for a given stream `key`.
        /// Take note of the StreamInfoGroupsReply return type.
        ///
        /// *It's possible this return value might not contain new fields
        /// added by Redis in future versions.*
        ///
        /// ```text
        /// XINFO GROUPS <key>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xinfo_groups<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::xinfo_groups(key).query(self)
        }
        /// Returns info about high-level stream details
        /// (first & last message `id`, length, number of groups, etc.)
        /// Take note of the StreamInfoStreamReply return type.
        ///
        /// *It's possible this return value might not contain new fields
        /// added by Redis in future versions.*
        ///
        /// ```text
        /// XINFO STREAM <key>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xinfo_stream<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::xinfo_stream(key).query(self)
        }
        /// Returns the number of messages for a given stream `key`.
        ///
        /// ```text
        /// XLEN <key>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xlen<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::xlen(key).query(self)
        }
        /// This is a basic version of making XPENDING command calls which only
        /// passes a stream `key` and consumer `group` and it
        /// returns details about which consumers have pending messages
        /// that haven't been acked.
        ///
        /// You can use this method along with
        /// `xclaim` or `xclaim_options` for determining which messages
        /// need to be retried.
        ///
        /// Take note of the StreamPendingReply return type.
        ///
        /// ```text
        /// XPENDING <key> <group> [<start> <stop> <count> [<consumer>]]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xpending<'a, K: ToRedisArgs, G: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            group: G,
        ) -> RedisResult<RV> {
            Cmd::xpending(key, group).query(self)
        }
        /// This XPENDING version returns a list of all messages over the range.
        /// You can use this for paginating pending messages (but without the message HashMap).
        ///
        /// Start and end follow the same rules `xrange` args. Set start to `-`
        /// and end to `+` for the entire stream.
        ///
        /// Take note of the StreamPendingCountReply return type.
        ///
        /// ```text
        /// XPENDING <key> <group> <start> <stop> <count>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xpending_count<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            S: ToRedisArgs,
            E: ToRedisArgs,
            C: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, group: G, start: S, end: E, count: C) -> RedisResult<RV> {
            Cmd::xpending_count(key, group, start, end, count).query(self)
        }
        /// An alternate version of `xpending_count` which filters by `consumer` name.
        ///
        /// Start and end follow the same rules `xrange` args. Set start to `-`
        /// and end to `+` for the entire stream.
        ///
        /// Take note of the StreamPendingCountReply return type.
        ///
        /// ```text
        /// XPENDING <key> <group> <start> <stop> <count> <consumer>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xpending_consumer_count<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            S: ToRedisArgs,
            E: ToRedisArgs,
            C: ToRedisArgs,
            CN: ToRedisArgs,
            RV: FromRedisValue,
        >(
            &mut self,
            key: K,
            group: G,
            start: S,
            end: E,
            count: C,
            consumer: CN,
        ) -> RedisResult<RV> {
            Cmd::xpending_consumer_count(key, group, start, end, count, consumer)
                .query(self)
        }
        /// Returns a range of messages in a given stream `key`.
        ///
        /// Set `start` to `-` to begin at the first message.
        /// Set `end` to `+` to end the most recent message.
        /// You can pass message `id` to both `start` and `end`.
        ///
        /// Take note of the StreamRangeReply return type.
        ///
        /// ```text
        /// XRANGE key start end
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xrange<
            'a,
            K: ToRedisArgs,
            S: ToRedisArgs,
            E: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, start: S, end: E) -> RedisResult<RV> {
            Cmd::xrange(key, start, end).query(self)
        }
        /// A helper method for automatically returning all messages in a stream by `key`.
        /// **Use with caution!**
        ///
        /// ```text
        /// XRANGE key - +
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xrange_all<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::xrange_all(key).query(self)
        }
        /// A method for paginating a stream by `key`.
        ///
        /// ```text
        /// XRANGE key start end [COUNT <n>]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xrange_count<
            'a,
            K: ToRedisArgs,
            S: ToRedisArgs,
            E: ToRedisArgs,
            C: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, start: S, end: E, count: C) -> RedisResult<RV> {
            Cmd::xrange_count(key, start, end, count).query(self)
        }
        /// Read a list of `id`s for each stream `key`.
        /// This is the basic form of reading streams.
        /// For more advanced control, like blocking, limiting, or reading by consumer `group`,
        /// see `xread_options`.
        ///
        /// ```text
        /// XREAD STREAMS key_1 key_2 ... key_N ID_1 ID_2 ... ID_N
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xread<'a, K: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            keys: &'a [K],
            ids: &'a [ID],
        ) -> RedisResult<RV> {
            Cmd::xread(keys, ids).query(self)
        }
        /// This method handles setting optional arguments for
        /// `XREAD` or `XREADGROUP` Redis commands.
        /// ```no_run
        /// use redis::{Connection,RedisResult,Commands};
        /// use redis::streams::{StreamReadOptions,StreamReadReply};
        /// let client = redis::Client::open("redis://127.0.0.1/0").unwrap();
        /// let mut con = client.get_connection().unwrap();
        ///
        /// // Read 10 messages from the start of the stream,
        /// // without registering as a consumer group.
        ///
        /// let opts = StreamReadOptions::default()
        ///     .count(10);
        /// let results: RedisResult<StreamReadReply> =
        ///     con.xread_options(&["k1"], &["0"], &opts);
        ///
        /// // Read all undelivered messages for a given
        /// // consumer group. Be advised: the consumer group must already
        /// // exist before making this call. Also note: we're passing
        /// // '>' as the id here, which means all undelivered messages.
        ///
        /// let opts = StreamReadOptions::default()
        ///     .group("group-1", "consumer-1");
        /// let results: RedisResult<StreamReadReply> =
        ///     con.xread_options(&["k1"], &[">"], &opts);
        /// ```
        ///
        /// ```text
        /// XREAD [BLOCK <milliseconds>] [COUNT <count>]
        ///     STREAMS key_1 key_2 ... key_N
        ///     ID_1 ID_2 ... ID_N
        ///
        /// XREADGROUP [GROUP group-name consumer-name] [BLOCK <milliseconds>] [COUNT <count>] [NOACK]
        ///     STREAMS key_1 key_2 ... key_N
        ///     ID_1 ID_2 ... ID_N
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xread_options<'a, K: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            keys: &'a [K],
            ids: &'a [ID],
            options: &'a streams::StreamReadOptions,
        ) -> RedisResult<RV> {
            Cmd::xread_options(keys, ids, options).query(self)
        }
        /// This is the reverse version of `xrange`.
        /// The same rules apply for `start` and `end` here.
        ///
        /// ```text
        /// XREVRANGE key end start
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xrevrange<
            'a,
            K: ToRedisArgs,
            E: ToRedisArgs,
            S: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, end: E, start: S) -> RedisResult<RV> {
            Cmd::xrevrange(key, end, start).query(self)
        }
        /// This is the reverse version of `xrange_all`.
        /// The same rules apply for `start` and `end` here.
        ///
        /// ```text
        /// XREVRANGE key + -
        /// ```
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xrevrange_all<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<RV> {
            Cmd::xrevrange_all(key).query(self)
        }
        /// This is the reverse version of `xrange_count`.
        /// The same rules apply for `start` and `end` here.
        ///
        /// ```text
        /// XREVRANGE key end start [COUNT <n>]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xrevrange_count<
            'a,
            K: ToRedisArgs,
            E: ToRedisArgs,
            S: ToRedisArgs,
            C: ToRedisArgs,
            RV: FromRedisValue,
        >(&mut self, key: K, end: E, start: S, count: C) -> RedisResult<RV> {
            Cmd::xrevrange_count(key, end, start, count).query(self)
        }
        /// Trim a stream `key` to a MAXLEN count.
        ///
        /// ```text
        /// XTRIM <key> MAXLEN [~|=] <count>  (Same as XADD MAXLEN option)
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xtrim<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            maxlen: streams::StreamMaxlen,
        ) -> RedisResult<RV> {
            Cmd::xtrim(key, maxlen).query(self)
        }
        /// Trim a stream `key` with full options
        ///
        /// ```text
        /// XTRIM <key> <MAXLEN|MINID> [~|=] <threshold> [LIMIT <count>]  (Same as XADD MAXID|MINID options)
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn xtrim_options<'a, K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            options: &'a streams::StreamTrimOptions,
        ) -> RedisResult<RV> {
            Cmd::xtrim_options(key, options).query(self)
        }
        /// Adds a prepared script command to the pipeline.
        ///
        /// Note: unlike a call to [invoke](crate::ScriptInvocation::invoke), if the script isn't loaded during the pipeline operation,
        /// it will not automatically be loaded and retried. The script can be loaded using the
        /// [load](crate::ScriptInvocation::load) operation.
        /**

# Examples:

```rust,no_run
# fn do_something() -> redis::RedisResult<()> {
# let client = redis::Client::open("redis://127.0.0.1/").unwrap();
# let mut con = client.get_connection().unwrap();
let script = redis::Script::new(r"
    return tonumber(ARGV[1]) + tonumber(ARGV[2]);
");
script.prepare_invoke().load(&mut con)?;
let (a, b): (isize, isize) = redis::pipe()
    .invoke_script(script.arg(1).arg(2))
    .invoke_script(script.arg(2).arg(3))
    .query(&mut con)?;

assert_eq!(a, 3);
assert_eq!(b, 5);
# Ok(()) }
```
*/
        #[cfg(feature = "script")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        fn invoke_script<'a, RV: FromRedisValue>(
            &mut self,
            invocation: &'a crate::ScriptInvocation<'a>,
        ) -> RedisResult<RV> {
            Cmd::invoke_script(invocation).query(self)
        }
        /// Incrementally iterate the keys space.
        #[inline]
        fn scan<RV: FromRedisValue>(&mut self) -> RedisResult<Iter<'_, RV>> {
            let mut c = cmd("SCAN");
            c.cursor_arg(0);
            c.iter(self)
        }
        /// Incrementally iterate the keys space with options.
        #[inline]
        fn scan_options<RV: FromRedisValue>(
            &mut self,
            opts: ScanOptions,
        ) -> RedisResult<Iter<'_, RV>> {
            let mut c = cmd("SCAN");
            c.cursor_arg(0).arg(opts);
            c.iter(self)
        }
        /// Incrementally iterate the keys space for keys matching a pattern.
        #[inline]
        fn scan_match<P: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            pattern: P,
        ) -> RedisResult<Iter<'_, RV>> {
            let mut c = cmd("SCAN");
            c.cursor_arg(0).arg("MATCH").arg(pattern);
            c.iter(self)
        }
        /// Incrementally iterate hash fields and associated values.
        #[inline]
        fn hscan<K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<Iter<'_, RV>> {
            let mut c = cmd("HSCAN");
            c.arg(key).cursor_arg(0);
            c.iter(self)
        }
        /// Incrementally iterate hash fields and associated values for
        /// field names matching a pattern.
        #[inline]
        fn hscan_match<K: ToRedisArgs, P: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            pattern: P,
        ) -> RedisResult<Iter<'_, RV>> {
            let mut c = cmd("HSCAN");
            c.arg(key).cursor_arg(0).arg("MATCH").arg(pattern);
            c.iter(self)
        }
        /// Incrementally iterate set elements.
        #[inline]
        fn sscan<K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<Iter<'_, RV>> {
            let mut c = cmd("SSCAN");
            c.arg(key).cursor_arg(0);
            c.iter(self)
        }
        /// Incrementally iterate set elements for elements matching a pattern.
        #[inline]
        fn sscan_match<K: ToRedisArgs, P: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            pattern: P,
        ) -> RedisResult<Iter<'_, RV>> {
            let mut c = cmd("SSCAN");
            c.arg(key).cursor_arg(0).arg("MATCH").arg(pattern);
            c.iter(self)
        }
        /// Incrementally iterate sorted set elements.
        #[inline]
        fn zscan<K: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
        ) -> RedisResult<Iter<'_, RV>> {
            let mut c = cmd("ZSCAN");
            c.arg(key).cursor_arg(0);
            c.iter(self)
        }
        /// Incrementally iterate sorted set elements for elements matching a pattern.
        #[inline]
        fn zscan_match<K: ToRedisArgs, P: ToRedisArgs, RV: FromRedisValue>(
            &mut self,
            key: K,
            pattern: P,
        ) -> RedisResult<Iter<'_, RV>> {
            let mut c = cmd("ZSCAN");
            c.arg(key).cursor_arg(0).arg("MATCH").arg(pattern);
            c.iter(self)
        }
    }
    impl Cmd {
        /// Get the value of a key.  If key is a vec this becomes an `MGET`.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn get<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace(
                { cmd(if key.num_of_args() <= 1 { "GET" } else { "MGET" }).arg(key) },
                Cmd::new(),
            )
        }
        /// Get values of keys
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn mget<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("MGET").arg(key) }, Cmd::new())
        }
        /// Gets all keys matching pattern
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn keys<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("KEYS").arg(key) }, Cmd::new())
        }
        /// Set the string value of a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn set<'a, K: ToRedisArgs, V: ToRedisArgs>(key: K, value: V) -> Self {
            ::std::mem::replace({ cmd("SET").arg(key).arg(value) }, Cmd::new())
        }
        /// Set the string value of a key with options.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn set_options<'a, K: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            value: V,
            options: SetOptions,
        ) -> Self {
            ::std::mem::replace(
                { cmd("SET").arg(key).arg(value).arg(options) },
                Cmd::new(),
            )
        }
        /// Sets multiple keys to their values.
        #[allow(deprecated)]
        #[deprecated(since = "0.22.4", note = "Renamed to mset() to reflect Redis name")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn set_multiple<'a, K: ToRedisArgs, V: ToRedisArgs>(
            items: &'a [(K, V)],
        ) -> Self {
            ::std::mem::replace({ cmd("MSET").arg(items) }, Cmd::new())
        }
        /// Sets multiple keys to their values.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn mset<'a, K: ToRedisArgs, V: ToRedisArgs>(items: &'a [(K, V)]) -> Self {
            ::std::mem::replace({ cmd("MSET").arg(items) }, Cmd::new())
        }
        /// Set the value and expiration of a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn set_ex<'a, K: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            value: V,
            seconds: u64,
        ) -> Self {
            ::std::mem::replace(
                { cmd("SETEX").arg(key).arg(seconds).arg(value) },
                Cmd::new(),
            )
        }
        /// Set the value and expiration in milliseconds of a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pset_ex<'a, K: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            value: V,
            milliseconds: u64,
        ) -> Self {
            ::std::mem::replace(
                { cmd("PSETEX").arg(key).arg(milliseconds).arg(value) },
                Cmd::new(),
            )
        }
        /// Set the value of a key, only if the key does not exist
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn set_nx<'a, K: ToRedisArgs, V: ToRedisArgs>(key: K, value: V) -> Self {
            ::std::mem::replace({ cmd("SETNX").arg(key).arg(value) }, Cmd::new())
        }
        /// Sets multiple keys to their values failing if at least one already exists.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn mset_nx<'a, K: ToRedisArgs, V: ToRedisArgs>(items: &'a [(K, V)]) -> Self {
            ::std::mem::replace({ cmd("MSETNX").arg(items) }, Cmd::new())
        }
        /// Set the string value of a key and return its old value.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn getset<'a, K: ToRedisArgs, V: ToRedisArgs>(key: K, value: V) -> Self {
            ::std::mem::replace({ cmd("GETSET").arg(key).arg(value) }, Cmd::new())
        }
        /// Get a range of bytes/substring from the value of a key. Negative values provide an offset from the end of the value.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn getrange<'a, K: ToRedisArgs>(key: K, from: isize, to: isize) -> Self {
            ::std::mem::replace(
                { cmd("GETRANGE").arg(key).arg(from).arg(to) },
                Cmd::new(),
            )
        }
        /// Overwrite the part of the value stored in key at the specified offset.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn setrange<'a, K: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            offset: isize,
            value: V,
        ) -> Self {
            ::std::mem::replace(
                { cmd("SETRANGE").arg(key).arg(offset).arg(value) },
                Cmd::new(),
            )
        }
        /// Delete one or more keys.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn del<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("DEL").arg(key) }, Cmd::new())
        }
        /// Determine if a key exists.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn exists<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("EXISTS").arg(key) }, Cmd::new())
        }
        /// Determine the type of a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn key_type<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("TYPE").arg(key) }, Cmd::new())
        }
        /// Set a key's time to live in seconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn expire<'a, K: ToRedisArgs>(key: K, seconds: i64) -> Self {
            ::std::mem::replace({ cmd("EXPIRE").arg(key).arg(seconds) }, Cmd::new())
        }
        /// Set the expiration for a key as a UNIX timestamp.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn expire_at<'a, K: ToRedisArgs>(key: K, ts: i64) -> Self {
            ::std::mem::replace({ cmd("EXPIREAT").arg(key).arg(ts) }, Cmd::new())
        }
        /// Set a key's time to live in milliseconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pexpire<'a, K: ToRedisArgs>(key: K, ms: i64) -> Self {
            ::std::mem::replace({ cmd("PEXPIRE").arg(key).arg(ms) }, Cmd::new())
        }
        /// Set the expiration for a key as a UNIX timestamp in milliseconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pexpire_at<'a, K: ToRedisArgs>(key: K, ts: i64) -> Self {
            ::std::mem::replace({ cmd("PEXPIREAT").arg(key).arg(ts) }, Cmd::new())
        }
        /// Get the absolute Unix expiration timestamp in seconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn expire_time<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("EXPIRETIME").arg(key) }, Cmd::new())
        }
        /// Get the absolute Unix expiration timestamp in milliseconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pexpire_time<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("PEXPIRETIME").arg(key) }, Cmd::new())
        }
        /// Remove the expiration from a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn persist<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("PERSIST").arg(key) }, Cmd::new())
        }
        /// Get the time to live for a key in seconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn ttl<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("TTL").arg(key) }, Cmd::new())
        }
        /// Get the time to live for a key in milliseconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pttl<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("PTTL").arg(key) }, Cmd::new())
        }
        /// Get the value of a key and set expiration
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn get_ex<'a, K: ToRedisArgs>(key: K, expire_at: Expiry) -> Self {
            ::std::mem::replace(
                {
                    let (option, time_arg) = match expire_at {
                        Expiry::EX(sec) => ("EX", Some(sec)),
                        Expiry::PX(ms) => ("PX", Some(ms)),
                        Expiry::EXAT(timestamp_sec) => ("EXAT", Some(timestamp_sec)),
                        Expiry::PXAT(timestamp_ms) => ("PXAT", Some(timestamp_ms)),
                        Expiry::PERSIST => ("PERSIST", None),
                    };
                    cmd("GETEX").arg(key).arg(option).arg(time_arg)
                },
                Cmd::new(),
            )
        }
        /// Get the value of a key and delete it
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn get_del<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("GETDEL").arg(key) }, Cmd::new())
        }
        /// Rename a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rename<'a, K: ToRedisArgs, N: ToRedisArgs>(key: K, new_key: N) -> Self {
            ::std::mem::replace({ cmd("RENAME").arg(key).arg(new_key) }, Cmd::new())
        }
        /// Rename a key, only if the new key does not exist.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rename_nx<'a, K: ToRedisArgs, N: ToRedisArgs>(
            key: K,
            new_key: N,
        ) -> Self {
            ::std::mem::replace({ cmd("RENAMENX").arg(key).arg(new_key) }, Cmd::new())
        }
        /// Unlink one or more keys.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn unlink<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("UNLINK").arg(key) }, Cmd::new())
        }
        /// Append a value to a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn append<'a, K: ToRedisArgs, V: ToRedisArgs>(key: K, value: V) -> Self {
            ::std::mem::replace({ cmd("APPEND").arg(key).arg(value) }, Cmd::new())
        }
        /// Increment the numeric value of a key by the given amount.  This
        /// issues a `INCRBY` or `INCRBYFLOAT` depending on the type.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn incr<'a, K: ToRedisArgs, V: ToRedisArgs>(key: K, delta: V) -> Self {
            ::std::mem::replace(
                {
                    cmd(
                            if delta.describe_numeric_behavior()
                                == NumericBehavior::NumberIsFloat
                            {
                                "INCRBYFLOAT"
                            } else {
                                "INCRBY"
                            },
                        )
                        .arg(key)
                        .arg(delta)
                },
                Cmd::new(),
            )
        }
        /// Decrement the numeric value of a key by the given amount.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn decr<'a, K: ToRedisArgs, V: ToRedisArgs>(key: K, delta: V) -> Self {
            ::std::mem::replace({ cmd("DECRBY").arg(key).arg(delta) }, Cmd::new())
        }
        /// Sets or clears the bit at offset in the string value stored at key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn setbit<'a, K: ToRedisArgs>(key: K, offset: usize, value: bool) -> Self {
            ::std::mem::replace(
                { cmd("SETBIT").arg(key).arg(offset).arg(i32::from(value)) },
                Cmd::new(),
            )
        }
        /// Returns the bit value at offset in the string value stored at key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn getbit<'a, K: ToRedisArgs>(key: K, offset: usize) -> Self {
            ::std::mem::replace({ cmd("GETBIT").arg(key).arg(offset) }, Cmd::new())
        }
        /// Count set bits in a string.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bitcount<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("BITCOUNT").arg(key) }, Cmd::new())
        }
        /// Count set bits in a string in a range.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bitcount_range<'a, K: ToRedisArgs>(
            key: K,
            start: usize,
            end: usize,
        ) -> Self {
            ::std::mem::replace(
                { cmd("BITCOUNT").arg(key).arg(start).arg(end) },
                Cmd::new(),
            )
        }
        /// Perform a bitwise AND between multiple keys (containing string values)
        /// and store the result in the destination key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bit_and<'a, D: ToRedisArgs, S: ToRedisArgs>(
            dstkey: D,
            srckeys: S,
        ) -> Self {
            ::std::mem::replace(
                { cmd("BITOP").arg("AND").arg(dstkey).arg(srckeys) },
                Cmd::new(),
            )
        }
        /// Perform a bitwise OR between multiple keys (containing string values)
        /// and store the result in the destination key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bit_or<'a, D: ToRedisArgs, S: ToRedisArgs>(
            dstkey: D,
            srckeys: S,
        ) -> Self {
            ::std::mem::replace(
                { cmd("BITOP").arg("OR").arg(dstkey).arg(srckeys) },
                Cmd::new(),
            )
        }
        /// Perform a bitwise XOR between multiple keys (containing string values)
        /// and store the result in the destination key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bit_xor<'a, D: ToRedisArgs, S: ToRedisArgs>(
            dstkey: D,
            srckeys: S,
        ) -> Self {
            ::std::mem::replace(
                { cmd("BITOP").arg("XOR").arg(dstkey).arg(srckeys) },
                Cmd::new(),
            )
        }
        /// Perform a bitwise NOT of the key (containing string values)
        /// and store the result in the destination key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bit_not<'a, D: ToRedisArgs, S: ToRedisArgs>(
            dstkey: D,
            srckey: S,
        ) -> Self {
            ::std::mem::replace(
                { cmd("BITOP").arg("NOT").arg(dstkey).arg(srckey) },
                Cmd::new(),
            )
        }
        /// Get the length of the value stored in a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn strlen<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("STRLEN").arg(key) }, Cmd::new())
        }
        /// Gets a single (or multiple) fields from a hash.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hget<'a, K: ToRedisArgs, F: ToRedisArgs>(key: K, field: F) -> Self {
            ::std::mem::replace(
                {
                    cmd(if field.num_of_args() <= 1 { "HGET" } else { "HMGET" })
                        .arg(key)
                        .arg(field)
                },
                Cmd::new(),
            )
        }
        /// Deletes a single (or multiple) fields from a hash.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hdel<'a, K: ToRedisArgs, F: ToRedisArgs>(key: K, field: F) -> Self {
            ::std::mem::replace({ cmd("HDEL").arg(key).arg(field) }, Cmd::new())
        }
        /// Sets a single field in a hash.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hset<'a, K: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            field: F,
            value: V,
        ) -> Self {
            ::std::mem::replace(
                { cmd("HSET").arg(key).arg(field).arg(value) },
                Cmd::new(),
            )
        }
        /// Sets a single field in a hash if it does not exist.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hset_nx<'a, K: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            field: F,
            value: V,
        ) -> Self {
            ::std::mem::replace(
                { cmd("HSETNX").arg(key).arg(field).arg(value) },
                Cmd::new(),
            )
        }
        /// Sets multiple fields in a hash.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hset_multiple<'a, K: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            items: &'a [(F, V)],
        ) -> Self {
            ::std::mem::replace({ cmd("HMSET").arg(key).arg(items) }, Cmd::new())
        }
        /// Increments a value.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hincr<'a, K: ToRedisArgs, F: ToRedisArgs, D: ToRedisArgs>(
            key: K,
            field: F,
            delta: D,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd(
                            if delta.describe_numeric_behavior()
                                == NumericBehavior::NumberIsFloat
                            {
                                "HINCRBYFLOAT"
                            } else {
                                "HINCRBY"
                            },
                        )
                        .arg(key)
                        .arg(field)
                        .arg(delta)
                },
                Cmd::new(),
            )
        }
        /// Checks if a field in a hash exists.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hexists<'a, K: ToRedisArgs, F: ToRedisArgs>(key: K, field: F) -> Self {
            ::std::mem::replace({ cmd("HEXISTS").arg(key).arg(field) }, Cmd::new())
        }
        /// Get one or more fields' TTL in seconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn httl<'a, K: ToRedisArgs, F: ToRedisArgs>(key: K, fields: F) -> Self {
            ::std::mem::replace(
                {
                    cmd("HTTL")
                        .arg(key)
                        .arg("FIELDS")
                        .arg(fields.num_of_args())
                        .arg(fields)
                },
                Cmd::new(),
            )
        }
        /// Get one or more fields' TTL in milliseconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hpttl<'a, K: ToRedisArgs, F: ToRedisArgs>(key: K, fields: F) -> Self {
            ::std::mem::replace(
                {
                    cmd("HPTTL")
                        .arg(key)
                        .arg("FIELDS")
                        .arg(fields.num_of_args())
                        .arg(fields)
                },
                Cmd::new(),
            )
        }
        /// Set one or more fields' time to live in seconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hexpire<'a, K: ToRedisArgs, F: ToRedisArgs>(
            key: K,
            seconds: i64,
            opt: ExpireOption,
            fields: F,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("HEXPIRE")
                        .arg(key)
                        .arg(seconds)
                        .arg(opt)
                        .arg("FIELDS")
                        .arg(fields.num_of_args())
                        .arg(fields)
                },
                Cmd::new(),
            )
        }
        /// Set the expiration for one or more fields as a UNIX timestamp in milliseconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hexpire_at<'a, K: ToRedisArgs, F: ToRedisArgs>(
            key: K,
            ts: i64,
            opt: ExpireOption,
            fields: F,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("HEXPIREAT")
                        .arg(key)
                        .arg(ts)
                        .arg(opt)
                        .arg("FIELDS")
                        .arg(fields.num_of_args())
                        .arg(fields)
                },
                Cmd::new(),
            )
        }
        /// Returns the absolute Unix expiration timestamp in seconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hexpire_time<'a, K: ToRedisArgs, F: ToRedisArgs>(
            key: K,
            fields: F,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("HEXPIRETIME")
                        .arg(key)
                        .arg("FIELDS")
                        .arg(fields.num_of_args())
                        .arg(fields)
                },
                Cmd::new(),
            )
        }
        /// Remove the expiration from a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hpersist<'a, K: ToRedisArgs, F: ToRedisArgs>(key: K, fields: F) -> Self {
            ::std::mem::replace(
                {
                    cmd("HPERSIST")
                        .arg(key)
                        .arg("FIELDS")
                        .arg(fields.num_of_args())
                        .arg(fields)
                },
                Cmd::new(),
            )
        }
        /// Set one or more fields' time to live in milliseconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hpexpire<'a, K: ToRedisArgs, F: ToRedisArgs>(
            key: K,
            milliseconds: i64,
            opt: ExpireOption,
            fields: F,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("HPEXPIRE")
                        .arg(key)
                        .arg(milliseconds)
                        .arg(opt)
                        .arg("FIELDS")
                        .arg(fields.num_of_args())
                        .arg(fields)
                },
                Cmd::new(),
            )
        }
        /// Set the expiration for one or more fields as a UNIX timestamp in milliseconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hpexpire_at<'a, K: ToRedisArgs, F: ToRedisArgs>(
            key: K,
            ts: i64,
            opt: ExpireOption,
            fields: F,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("HPEXPIREAT")
                        .arg(key)
                        .arg(ts)
                        .arg(opt)
                        .arg("FIELDS")
                        .arg(fields.num_of_args())
                        .arg(fields)
                },
                Cmd::new(),
            )
        }
        /// Returns the absolute Unix expiration timestamp in seconds.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hpexpire_time<'a, K: ToRedisArgs, F: ToRedisArgs>(
            key: K,
            fields: F,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("HPEXPIRETIME")
                        .arg(key)
                        .arg("FIELDS")
                        .arg(fields.num_of_args())
                        .arg(fields)
                },
                Cmd::new(),
            )
        }
        /// Gets all the keys in a hash.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hkeys<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("HKEYS").arg(key) }, Cmd::new())
        }
        /// Gets all the values in a hash.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hvals<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("HVALS").arg(key) }, Cmd::new())
        }
        /// Gets all the fields and values in a hash.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hgetall<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("HGETALL").arg(key) }, Cmd::new())
        }
        /// Gets the length of a hash.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hlen<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("HLEN").arg(key) }, Cmd::new())
        }
        /// Pop an element from a list, push it to another list
        /// and return it; or block until one is available
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn blmove<'a, S: ToRedisArgs, D: ToRedisArgs>(
            srckey: S,
            dstkey: D,
            src_dir: Direction,
            dst_dir: Direction,
            timeout: f64,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("BLMOVE")
                        .arg(srckey)
                        .arg(dstkey)
                        .arg(src_dir)
                        .arg(dst_dir)
                        .arg(timeout)
                },
                Cmd::new(),
            )
        }
        /// Pops `count` elements from the first non-empty list key from the list of
        /// provided key names; or blocks until one is available.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn blmpop<'a, K: ToRedisArgs>(
            timeout: f64,
            numkeys: usize,
            key: K,
            dir: Direction,
            count: usize,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("BLMPOP")
                        .arg(timeout)
                        .arg(numkeys)
                        .arg(key)
                        .arg(dir)
                        .arg("COUNT")
                        .arg(count)
                },
                Cmd::new(),
            )
        }
        /// Remove and get the first element in a list, or block until one is available.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn blpop<'a, K: ToRedisArgs>(key: K, timeout: f64) -> Self {
            ::std::mem::replace({ cmd("BLPOP").arg(key).arg(timeout) }, Cmd::new())
        }
        /// Remove and get the last element in a list, or block until one is available.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn brpop<'a, K: ToRedisArgs>(key: K, timeout: f64) -> Self {
            ::std::mem::replace({ cmd("BRPOP").arg(key).arg(timeout) }, Cmd::new())
        }
        /// Pop a value from a list, push it to another list and return it;
        /// or block until one is available.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn brpoplpush<'a, S: ToRedisArgs, D: ToRedisArgs>(
            srckey: S,
            dstkey: D,
            timeout: f64,
        ) -> Self {
            ::std::mem::replace(
                { cmd("BRPOPLPUSH").arg(srckey).arg(dstkey).arg(timeout) },
                Cmd::new(),
            )
        }
        /// Get an element from a list by its index.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lindex<'a, K: ToRedisArgs>(key: K, index: isize) -> Self {
            ::std::mem::replace({ cmd("LINDEX").arg(key).arg(index) }, Cmd::new())
        }
        /// Insert an element before another element in a list.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn linsert_before<'a, K: ToRedisArgs, P: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            pivot: P,
            value: V,
        ) -> Self {
            ::std::mem::replace(
                { cmd("LINSERT").arg(key).arg("BEFORE").arg(pivot).arg(value) },
                Cmd::new(),
            )
        }
        /// Insert an element after another element in a list.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn linsert_after<'a, K: ToRedisArgs, P: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            pivot: P,
            value: V,
        ) -> Self {
            ::std::mem::replace(
                { cmd("LINSERT").arg(key).arg("AFTER").arg(pivot).arg(value) },
                Cmd::new(),
            )
        }
        /// Returns the length of the list stored at key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn llen<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("LLEN").arg(key) }, Cmd::new())
        }
        /// Pop an element a list, push it to another list and return it
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lmove<'a, S: ToRedisArgs, D: ToRedisArgs>(
            srckey: S,
            dstkey: D,
            src_dir: Direction,
            dst_dir: Direction,
        ) -> Self {
            ::std::mem::replace(
                { cmd("LMOVE").arg(srckey).arg(dstkey).arg(src_dir).arg(dst_dir) },
                Cmd::new(),
            )
        }
        /// Pops `count` elements from the first non-empty list key from the list of
        /// provided key names.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lmpop<'a, K: ToRedisArgs>(
            numkeys: usize,
            key: K,
            dir: Direction,
            count: usize,
        ) -> Self {
            ::std::mem::replace(
                { cmd("LMPOP").arg(numkeys).arg(key).arg(dir).arg("COUNT").arg(count) },
                Cmd::new(),
            )
        }
        /// Removes and returns the up to `count` first elements of the list stored at key.
        ///
        /// If `count` is not specified, then defaults to first element.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lpop<'a, K: ToRedisArgs>(
            key: K,
            count: Option<core::num::NonZeroUsize>,
        ) -> Self {
            ::std::mem::replace({ cmd("LPOP").arg(key).arg(count) }, Cmd::new())
        }
        /// Returns the index of the first matching value of the list stored at key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lpos<'a, K: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            value: V,
            options: LposOptions,
        ) -> Self {
            ::std::mem::replace(
                { cmd("LPOS").arg(key).arg(value).arg(options) },
                Cmd::new(),
            )
        }
        /// Insert all the specified values at the head of the list stored at key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lpush<'a, K: ToRedisArgs, V: ToRedisArgs>(key: K, value: V) -> Self {
            ::std::mem::replace({ cmd("LPUSH").arg(key).arg(value) }, Cmd::new())
        }
        /// Inserts a value at the head of the list stored at key, only if key
        /// already exists and holds a list.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lpush_exists<'a, K: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            value: V,
        ) -> Self {
            ::std::mem::replace({ cmd("LPUSHX").arg(key).arg(value) }, Cmd::new())
        }
        /// Returns the specified elements of the list stored at key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lrange<'a, K: ToRedisArgs>(key: K, start: isize, stop: isize) -> Self {
            ::std::mem::replace(
                { cmd("LRANGE").arg(key).arg(start).arg(stop) },
                Cmd::new(),
            )
        }
        /// Removes the first count occurrences of elements equal to value
        /// from the list stored at key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lrem<'a, K: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            count: isize,
            value: V,
        ) -> Self {
            ::std::mem::replace(
                { cmd("LREM").arg(key).arg(count).arg(value) },
                Cmd::new(),
            )
        }
        /// Trim an existing list so that it will contain only the specified
        /// range of elements specified.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn ltrim<'a, K: ToRedisArgs>(key: K, start: isize, stop: isize) -> Self {
            ::std::mem::replace(
                { cmd("LTRIM").arg(key).arg(start).arg(stop) },
                Cmd::new(),
            )
        }
        /// Sets the list element at index to value
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lset<'a, K: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            index: isize,
            value: V,
        ) -> Self {
            ::std::mem::replace(
                { cmd("LSET").arg(key).arg(index).arg(value) },
                Cmd::new(),
            )
        }
        /// Sends a ping to the server
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn ping<'a>() -> Self {
            ::std::mem::replace({ &mut cmd("PING") }, Cmd::new())
        }
        /// Sends a ping with a message to the server
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn ping_message<'a, K: ToRedisArgs>(message: K) -> Self {
            ::std::mem::replace({ cmd("PING").arg(message) }, Cmd::new())
        }
        /// Removes and returns the up to `count` last elements of the list stored at key
        ///
        /// If `count` is not specified, then defaults to last element.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rpop<'a, K: ToRedisArgs>(
            key: K,
            count: Option<core::num::NonZeroUsize>,
        ) -> Self {
            ::std::mem::replace({ cmd("RPOP").arg(key).arg(count) }, Cmd::new())
        }
        /// Pop a value from a list, push it to another list and return it.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rpoplpush<'a, K: ToRedisArgs, D: ToRedisArgs>(key: K, dstkey: D) -> Self {
            ::std::mem::replace({ cmd("RPOPLPUSH").arg(key).arg(dstkey) }, Cmd::new())
        }
        /// Insert all the specified values at the tail of the list stored at key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rpush<'a, K: ToRedisArgs, V: ToRedisArgs>(key: K, value: V) -> Self {
            ::std::mem::replace({ cmd("RPUSH").arg(key).arg(value) }, Cmd::new())
        }
        /// Inserts value at the tail of the list stored at key, only if key
        /// already exists and holds a list.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rpush_exists<'a, K: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            value: V,
        ) -> Self {
            ::std::mem::replace({ cmd("RPUSHX").arg(key).arg(value) }, Cmd::new())
        }
        /// Add one or more members to a set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sadd<'a, K: ToRedisArgs, M: ToRedisArgs>(key: K, member: M) -> Self {
            ::std::mem::replace({ cmd("SADD").arg(key).arg(member) }, Cmd::new())
        }
        /// Get the number of members in a set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn scard<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("SCARD").arg(key) }, Cmd::new())
        }
        /// Subtract multiple sets.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sdiff<'a, K: ToRedisArgs>(keys: K) -> Self {
            ::std::mem::replace({ cmd("SDIFF").arg(keys) }, Cmd::new())
        }
        /// Subtract multiple sets and store the resulting set in a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sdiffstore<'a, D: ToRedisArgs, K: ToRedisArgs>(
            dstkey: D,
            keys: K,
        ) -> Self {
            ::std::mem::replace({ cmd("SDIFFSTORE").arg(dstkey).arg(keys) }, Cmd::new())
        }
        /// Intersect multiple sets.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sinter<'a, K: ToRedisArgs>(keys: K) -> Self {
            ::std::mem::replace({ cmd("SINTER").arg(keys) }, Cmd::new())
        }
        /// Intersect multiple sets and store the resulting set in a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sinterstore<'a, D: ToRedisArgs, K: ToRedisArgs>(
            dstkey: D,
            keys: K,
        ) -> Self {
            ::std::mem::replace({ cmd("SINTERSTORE").arg(dstkey).arg(keys) }, Cmd::new())
        }
        /// Determine if a given value is a member of a set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sismember<'a, K: ToRedisArgs, M: ToRedisArgs>(key: K, member: M) -> Self {
            ::std::mem::replace({ cmd("SISMEMBER").arg(key).arg(member) }, Cmd::new())
        }
        /// Determine if given values are members of a set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn smismember<'a, K: ToRedisArgs, M: ToRedisArgs>(
            key: K,
            members: M,
        ) -> Self {
            ::std::mem::replace({ cmd("SMISMEMBER").arg(key).arg(members) }, Cmd::new())
        }
        /// Get all the members in a set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn smembers<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("SMEMBERS").arg(key) }, Cmd::new())
        }
        /// Move a member from one set to another.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn smove<'a, S: ToRedisArgs, D: ToRedisArgs, M: ToRedisArgs>(
            srckey: S,
            dstkey: D,
            member: M,
        ) -> Self {
            ::std::mem::replace(
                { cmd("SMOVE").arg(srckey).arg(dstkey).arg(member) },
                Cmd::new(),
            )
        }
        /// Remove and return a random member from a set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn spop<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("SPOP").arg(key) }, Cmd::new())
        }
        /// Get one random member from a set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn srandmember<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("SRANDMEMBER").arg(key) }, Cmd::new())
        }
        /// Get multiple random members from a set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn srandmember_multiple<'a, K: ToRedisArgs>(key: K, count: usize) -> Self {
            ::std::mem::replace({ cmd("SRANDMEMBER").arg(key).arg(count) }, Cmd::new())
        }
        /// Remove one or more members from a set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn srem<'a, K: ToRedisArgs, M: ToRedisArgs>(key: K, member: M) -> Self {
            ::std::mem::replace({ cmd("SREM").arg(key).arg(member) }, Cmd::new())
        }
        /// Add multiple sets.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sunion<'a, K: ToRedisArgs>(keys: K) -> Self {
            ::std::mem::replace({ cmd("SUNION").arg(keys) }, Cmd::new())
        }
        /// Add multiple sets and store the resulting set in a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sunionstore<'a, D: ToRedisArgs, K: ToRedisArgs>(
            dstkey: D,
            keys: K,
        ) -> Self {
            ::std::mem::replace({ cmd("SUNIONSTORE").arg(dstkey).arg(keys) }, Cmd::new())
        }
        /// Add one member to a sorted set, or update its score if it already exists.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zadd<'a, K: ToRedisArgs, S: ToRedisArgs, M: ToRedisArgs>(
            key: K,
            member: M,
            score: S,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZADD").arg(key).arg(score).arg(member) },
                Cmd::new(),
            )
        }
        /// Add multiple members to a sorted set, or update its score if it already exists.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zadd_multiple<'a, K: ToRedisArgs, S: ToRedisArgs, M: ToRedisArgs>(
            key: K,
            items: &'a [(S, M)],
        ) -> Self {
            ::std::mem::replace({ cmd("ZADD").arg(key).arg(items) }, Cmd::new())
        }
        /// Get the number of members in a sorted set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zcard<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("ZCARD").arg(key) }, Cmd::new())
        }
        /// Count the members in a sorted set with scores within the given values.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zcount<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            key: K,
            min: M,
            max: MM,
        ) -> Self {
            ::std::mem::replace({ cmd("ZCOUNT").arg(key).arg(min).arg(max) }, Cmd::new())
        }
        /// Increments the member in a sorted set at key by delta.
        /// If the member does not exist, it is added with delta as its score.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zincr<'a, K: ToRedisArgs, M: ToRedisArgs, D: ToRedisArgs>(
            key: K,
            member: M,
            delta: D,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZINCRBY").arg(key).arg(delta).arg(member) },
                Cmd::new(),
            )
        }
        /// Intersect multiple sorted sets and store the resulting sorted set in
        /// a new key using SUM as aggregation function.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore<'a, D: ToRedisArgs, K: ToRedisArgs>(
            dstkey: D,
            keys: K,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZINTERSTORE").arg(dstkey).arg(keys.num_of_args()).arg(keys) },
                Cmd::new(),
            )
        }
        /// Intersect multiple sorted sets and store the resulting sorted set in
        /// a new key using MIN as aggregation function.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore_min<'a, D: ToRedisArgs, K: ToRedisArgs>(
            dstkey: D,
            keys: K,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZINTERSTORE")
                        .arg(dstkey)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("AGGREGATE")
                        .arg("MIN")
                },
                Cmd::new(),
            )
        }
        /// Intersect multiple sorted sets and store the resulting sorted set in
        /// a new key using MAX as aggregation function.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore_max<'a, D: ToRedisArgs, K: ToRedisArgs>(
            dstkey: D,
            keys: K,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZINTERSTORE")
                        .arg(dstkey)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("AGGREGATE")
                        .arg("MAX")
                },
                Cmd::new(),
            )
        }
        /// [Commands::zinterstore], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore_weights<'a, D: ToRedisArgs, K: ToRedisArgs, W: ToRedisArgs>(
            dstkey: D,
            keys: &'a [(K, W)],
        ) -> Self {
            ::std::mem::replace(
                {
                    let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                        .iter()
                        .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                        .unzip();
                    cmd("ZINTERSTORE")
                        .arg(dstkey)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("WEIGHTS")
                        .arg(weights)
                },
                Cmd::new(),
            )
        }
        /// [Commands::zinterstore_min], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore_min_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
        >(dstkey: D, keys: &'a [(K, W)]) -> Self {
            ::std::mem::replace(
                {
                    let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                        .iter()
                        .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                        .unzip();
                    cmd("ZINTERSTORE")
                        .arg(dstkey)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("AGGREGATE")
                        .arg("MIN")
                        .arg("WEIGHTS")
                        .arg(weights)
                },
                Cmd::new(),
            )
        }
        /// [Commands::zinterstore_max], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore_max_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
        >(dstkey: D, keys: &'a [(K, W)]) -> Self {
            ::std::mem::replace(
                {
                    let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                        .iter()
                        .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                        .unzip();
                    cmd("ZINTERSTORE")
                        .arg(dstkey)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("AGGREGATE")
                        .arg("MAX")
                        .arg("WEIGHTS")
                        .arg(weights)
                },
                Cmd::new(),
            )
        }
        /// Count the number of members in a sorted set between a given lexicographical range.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zlexcount<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            key: K,
            min: M,
            max: MM,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZLEXCOUNT").arg(key).arg(min).arg(max) },
                Cmd::new(),
            )
        }
        /// Removes and returns the member with the highest score in a sorted set.
        /// Blocks until a member is available otherwise.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bzpopmax<'a, K: ToRedisArgs>(key: K, timeout: f64) -> Self {
            ::std::mem::replace({ cmd("BZPOPMAX").arg(key).arg(timeout) }, Cmd::new())
        }
        /// Removes and returns up to count members with the highest scores in a sorted set
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zpopmax<'a, K: ToRedisArgs>(key: K, count: isize) -> Self {
            ::std::mem::replace({ cmd("ZPOPMAX").arg(key).arg(count) }, Cmd::new())
        }
        /// Removes and returns the member with the lowest score in a sorted set.
        /// Blocks until a member is available otherwise.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bzpopmin<'a, K: ToRedisArgs>(key: K, timeout: f64) -> Self {
            ::std::mem::replace({ cmd("BZPOPMIN").arg(key).arg(timeout) }, Cmd::new())
        }
        /// Removes and returns up to count members with the lowest scores in a sorted set
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zpopmin<'a, K: ToRedisArgs>(key: K, count: isize) -> Self {
            ::std::mem::replace({ cmd("ZPOPMIN").arg(key).arg(count) }, Cmd::new())
        }
        /// Removes and returns up to count members with the highest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        /// Blocks until a member is available otherwise.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bzmpop_max<'a, K: ToRedisArgs>(
            timeout: f64,
            keys: K,
            count: isize,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("BZMPOP")
                        .arg(timeout)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("MAX")
                        .arg("COUNT")
                        .arg(count)
                },
                Cmd::new(),
            )
        }
        /// Removes and returns up to count members with the highest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zmpop_max<'a, K: ToRedisArgs>(keys: K, count: isize) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZMPOP")
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("MAX")
                        .arg("COUNT")
                        .arg(count)
                },
                Cmd::new(),
            )
        }
        /// Removes and returns up to count members with the lowest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        /// Blocks until a member is available otherwise.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bzmpop_min<'a, K: ToRedisArgs>(
            timeout: f64,
            keys: K,
            count: isize,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("BZMPOP")
                        .arg(timeout)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("MIN")
                        .arg("COUNT")
                        .arg(count)
                },
                Cmd::new(),
            )
        }
        /// Removes and returns up to count members with the lowest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zmpop_min<'a, K: ToRedisArgs>(keys: K, count: isize) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZMPOP")
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("MIN")
                        .arg("COUNT")
                        .arg(count)
                },
                Cmd::new(),
            )
        }
        /// Return up to count random members in a sorted set (or 1 if `count == None`)
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrandmember<'a, K: ToRedisArgs>(key: K, count: Option<isize>) -> Self {
            ::std::mem::replace({ cmd("ZRANDMEMBER").arg(key).arg(count) }, Cmd::new())
        }
        /// Return up to count random members in a sorted set with scores
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrandmember_withscores<'a, K: ToRedisArgs>(key: K, count: isize) -> Self {
            ::std::mem::replace(
                { cmd("ZRANDMEMBER").arg(key).arg(count).arg("WITHSCORES") },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by index
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrange<'a, K: ToRedisArgs>(key: K, start: isize, stop: isize) -> Self {
            ::std::mem::replace(
                { cmd("ZRANGE").arg(key).arg(start).arg(stop) },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by index with scores.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrange_withscores<'a, K: ToRedisArgs>(
            key: K,
            start: isize,
            stop: isize,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZRANGE").arg(key).arg(start).arg(stop).arg("WITHSCORES") },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by lexicographical range.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebylex<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            key: K,
            min: M,
            max: MM,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZRANGEBYLEX").arg(key).arg(min).arg(max) },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by lexicographical
        /// range with offset and limit.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebylex_limit<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            key: K,
            min: M,
            max: MM,
            offset: isize,
            count: isize,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZRANGEBYLEX")
                        .arg(key)
                        .arg(min)
                        .arg(max)
                        .arg("LIMIT")
                        .arg(offset)
                        .arg(count)
                },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by lexicographical range.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebylex<'a, K: ToRedisArgs, MM: ToRedisArgs, M: ToRedisArgs>(
            key: K,
            max: MM,
            min: M,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZREVRANGEBYLEX").arg(key).arg(max).arg(min) },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by lexicographical
        /// range with offset and limit.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebylex_limit<'a, K: ToRedisArgs, MM: ToRedisArgs, M: ToRedisArgs>(
            key: K,
            max: MM,
            min: M,
            offset: isize,
            count: isize,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZREVRANGEBYLEX")
                        .arg(key)
                        .arg(max)
                        .arg(min)
                        .arg("LIMIT")
                        .arg(offset)
                        .arg(count)
                },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by score.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebyscore<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            key: K,
            min: M,
            max: MM,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZRANGEBYSCORE").arg(key).arg(min).arg(max) },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by score with scores.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebyscore_withscores<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
        >(key: K, min: M, max: MM) -> Self {
            ::std::mem::replace(
                { cmd("ZRANGEBYSCORE").arg(key).arg(min).arg(max).arg("WITHSCORES") },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by score with limit.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebyscore_limit<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            key: K,
            min: M,
            max: MM,
            offset: isize,
            count: isize,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZRANGEBYSCORE")
                        .arg(key)
                        .arg(min)
                        .arg(max)
                        .arg("LIMIT")
                        .arg(offset)
                        .arg(count)
                },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by score with limit with scores.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebyscore_limit_withscores<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
        >(key: K, min: M, max: MM, offset: isize, count: isize) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZRANGEBYSCORE")
                        .arg(key)
                        .arg(min)
                        .arg(max)
                        .arg("WITHSCORES")
                        .arg("LIMIT")
                        .arg(offset)
                        .arg(count)
                },
                Cmd::new(),
            )
        }
        /// Determine the index of a member in a sorted set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrank<'a, K: ToRedisArgs, M: ToRedisArgs>(key: K, member: M) -> Self {
            ::std::mem::replace({ cmd("ZRANK").arg(key).arg(member) }, Cmd::new())
        }
        /// Remove one or more members from a sorted set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrem<'a, K: ToRedisArgs, M: ToRedisArgs>(key: K, members: M) -> Self {
            ::std::mem::replace({ cmd("ZREM").arg(key).arg(members) }, Cmd::new())
        }
        /// Remove all members in a sorted set between the given lexicographical range.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrembylex<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            key: K,
            min: M,
            max: MM,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZREMRANGEBYLEX").arg(key).arg(min).arg(max) },
                Cmd::new(),
            )
        }
        /// Remove all members in a sorted set within the given indexes.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zremrangebyrank<'a, K: ToRedisArgs>(
            key: K,
            start: isize,
            stop: isize,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZREMRANGEBYRANK").arg(key).arg(start).arg(stop) },
                Cmd::new(),
            )
        }
        /// Remove all members in a sorted set within the given scores.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrembyscore<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            key: K,
            min: M,
            max: MM,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZREMRANGEBYSCORE").arg(key).arg(min).arg(max) },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by index, with scores
        /// ordered from high to low.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrange<'a, K: ToRedisArgs>(key: K, start: isize, stop: isize) -> Self {
            ::std::mem::replace(
                { cmd("ZREVRANGE").arg(key).arg(start).arg(stop) },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by index, with scores
        /// ordered from high to low.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrange_withscores<'a, K: ToRedisArgs>(
            key: K,
            start: isize,
            stop: isize,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZREVRANGE").arg(key).arg(start).arg(stop).arg("WITHSCORES") },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by score.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebyscore<'a, K: ToRedisArgs, MM: ToRedisArgs, M: ToRedisArgs>(
            key: K,
            max: MM,
            min: M,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZREVRANGEBYSCORE").arg(key).arg(max).arg(min) },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by score with scores.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebyscore_withscores<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
        >(key: K, max: MM, min: M) -> Self {
            ::std::mem::replace(
                { cmd("ZREVRANGEBYSCORE").arg(key).arg(max).arg(min).arg("WITHSCORES") },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by score with limit.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebyscore_limit<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
        >(key: K, max: MM, min: M, offset: isize, count: isize) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZREVRANGEBYSCORE")
                        .arg(key)
                        .arg(max)
                        .arg(min)
                        .arg("LIMIT")
                        .arg(offset)
                        .arg(count)
                },
                Cmd::new(),
            )
        }
        /// Return a range of members in a sorted set, by score with limit with scores.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebyscore_limit_withscores<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
        >(key: K, max: MM, min: M, offset: isize, count: isize) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZREVRANGEBYSCORE")
                        .arg(key)
                        .arg(max)
                        .arg(min)
                        .arg("WITHSCORES")
                        .arg("LIMIT")
                        .arg(offset)
                        .arg(count)
                },
                Cmd::new(),
            )
        }
        /// Determine the index of a member in a sorted set, with scores ordered from high to low.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrank<'a, K: ToRedisArgs, M: ToRedisArgs>(key: K, member: M) -> Self {
            ::std::mem::replace({ cmd("ZREVRANK").arg(key).arg(member) }, Cmd::new())
        }
        /// Get the score associated with the given member in a sorted set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zscore<'a, K: ToRedisArgs, M: ToRedisArgs>(key: K, member: M) -> Self {
            ::std::mem::replace({ cmd("ZSCORE").arg(key).arg(member) }, Cmd::new())
        }
        /// Get the scores associated with multiple members in a sorted set.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zscore_multiple<'a, K: ToRedisArgs, M: ToRedisArgs>(
            key: K,
            members: &'a [M],
        ) -> Self {
            ::std::mem::replace({ cmd("ZMSCORE").arg(key).arg(members) }, Cmd::new())
        }
        /// Unions multiple sorted sets and store the resulting sorted set in
        /// a new key using SUM as aggregation function.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore<'a, D: ToRedisArgs, K: ToRedisArgs>(
            dstkey: D,
            keys: K,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ZUNIONSTORE").arg(dstkey).arg(keys.num_of_args()).arg(keys) },
                Cmd::new(),
            )
        }
        /// Unions multiple sorted sets and store the resulting sorted set in
        /// a new key using MIN as aggregation function.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore_min<'a, D: ToRedisArgs, K: ToRedisArgs>(
            dstkey: D,
            keys: K,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZUNIONSTORE")
                        .arg(dstkey)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("AGGREGATE")
                        .arg("MIN")
                },
                Cmd::new(),
            )
        }
        /// Unions multiple sorted sets and store the resulting sorted set in
        /// a new key using MAX as aggregation function.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore_max<'a, D: ToRedisArgs, K: ToRedisArgs>(
            dstkey: D,
            keys: K,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("ZUNIONSTORE")
                        .arg(dstkey)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("AGGREGATE")
                        .arg("MAX")
                },
                Cmd::new(),
            )
        }
        /// [Commands::zunionstore], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore_weights<'a, D: ToRedisArgs, K: ToRedisArgs, W: ToRedisArgs>(
            dstkey: D,
            keys: &'a [(K, W)],
        ) -> Self {
            ::std::mem::replace(
                {
                    let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                        .iter()
                        .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                        .unzip();
                    cmd("ZUNIONSTORE")
                        .arg(dstkey)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("WEIGHTS")
                        .arg(weights)
                },
                Cmd::new(),
            )
        }
        /// [Commands::zunionstore_min], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore_min_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
        >(dstkey: D, keys: &'a [(K, W)]) -> Self {
            ::std::mem::replace(
                {
                    let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                        .iter()
                        .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                        .unzip();
                    cmd("ZUNIONSTORE")
                        .arg(dstkey)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("AGGREGATE")
                        .arg("MIN")
                        .arg("WEIGHTS")
                        .arg(weights)
                },
                Cmd::new(),
            )
        }
        /// [Commands::zunionstore_max], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore_max_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
        >(dstkey: D, keys: &'a [(K, W)]) -> Self {
            ::std::mem::replace(
                {
                    let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                        .iter()
                        .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                        .unzip();
                    cmd("ZUNIONSTORE")
                        .arg(dstkey)
                        .arg(keys.num_of_args())
                        .arg(keys)
                        .arg("AGGREGATE")
                        .arg("MAX")
                        .arg("WEIGHTS")
                        .arg(weights)
                },
                Cmd::new(),
            )
        }
        /// Adds the specified elements to the specified HyperLogLog.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pfadd<'a, K: ToRedisArgs, E: ToRedisArgs>(key: K, element: E) -> Self {
            ::std::mem::replace({ cmd("PFADD").arg(key).arg(element) }, Cmd::new())
        }
        /// Return the approximated cardinality of the set(s) observed by the
        /// HyperLogLog at key(s).
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pfcount<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("PFCOUNT").arg(key) }, Cmd::new())
        }
        /// Merge N different HyperLogLogs into a single one.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pfmerge<'a, D: ToRedisArgs, S: ToRedisArgs>(
            dstkey: D,
            srckeys: S,
        ) -> Self {
            ::std::mem::replace({ cmd("PFMERGE").arg(dstkey).arg(srckeys) }, Cmd::new())
        }
        /// Posts a message to the given channel.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn publish<'a, K: ToRedisArgs, E: ToRedisArgs>(
            channel: K,
            message: E,
        ) -> Self {
            ::std::mem::replace({ cmd("PUBLISH").arg(channel).arg(message) }, Cmd::new())
        }
        /// Posts a message to the given sharded channel.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn spublish<'a, K: ToRedisArgs, E: ToRedisArgs>(
            channel: K,
            message: E,
        ) -> Self {
            ::std::mem::replace(
                { cmd("SPUBLISH").arg(channel).arg(message) },
                Cmd::new(),
            )
        }
        /// Returns the encoding of a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn object_encoding<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("OBJECT").arg("ENCODING").arg(key) }, Cmd::new())
        }
        /// Returns the time in seconds since the last access of a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn object_idletime<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("OBJECT").arg("IDLETIME").arg(key) }, Cmd::new())
        }
        /// Returns the logarithmic access frequency counter of a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn object_freq<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("OBJECT").arg("FREQ").arg(key) }, Cmd::new())
        }
        /// Returns the reference count of a key.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn object_refcount<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("OBJECT").arg("REFCOUNT").arg(key) }, Cmd::new())
        }
        /// Returns the name of the current connection as set by CLIENT SETNAME.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn client_getname<'a>() -> Self {
            ::std::mem::replace({ cmd("CLIENT").arg("GETNAME") }, Cmd::new())
        }
        /// Returns the ID of the current connection.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn client_id<'a>() -> Self {
            ::std::mem::replace({ cmd("CLIENT").arg("ID") }, Cmd::new())
        }
        /// Command assigns a name to the current connection.
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn client_setname<'a, K: ToRedisArgs>(connection_name: K) -> Self {
            ::std::mem::replace(
                { cmd("CLIENT").arg("SETNAME").arg(connection_name) },
                Cmd::new(),
            )
        }
        /// When Redis is configured to use an ACL file (with the aclfile
        /// configuration option), this command will reload the ACLs from the file,
        /// replacing all the current ACL rules with the ones defined in the file.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_load<'a>() -> Self {
            ::std::mem::replace({ cmd("ACL").arg("LOAD") }, Cmd::new())
        }
        /// When Redis is configured to use an ACL file (with the aclfile
        /// configuration option), this command will save the currently defined
        /// ACLs from the server memory to the ACL file.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_save<'a>() -> Self {
            ::std::mem::replace({ cmd("ACL").arg("SAVE") }, Cmd::new())
        }
        /// Shows the currently active ACL rules in the Redis server.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_list<'a>() -> Self {
            ::std::mem::replace({ cmd("ACL").arg("LIST") }, Cmd::new())
        }
        /// Shows a list of all the usernames of the currently configured users in
        /// the Redis ACL system.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_users<'a>() -> Self {
            ::std::mem::replace({ cmd("ACL").arg("USERS") }, Cmd::new())
        }
        /// Returns all the rules defined for an existing ACL user.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_getuser<'a, K: ToRedisArgs>(username: K) -> Self {
            ::std::mem::replace({ cmd("ACL").arg("GETUSER").arg(username) }, Cmd::new())
        }
        /// Creates an ACL user without any privilege.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_setuser<'a, K: ToRedisArgs>(username: K) -> Self {
            ::std::mem::replace({ cmd("ACL").arg("SETUSER").arg(username) }, Cmd::new())
        }
        /// Creates an ACL user with the specified rules or modify the rules of
        /// an existing user.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_setuser_rules<'a, K: ToRedisArgs>(
            username: K,
            rules: &'a [acl::Rule],
        ) -> Self {
            ::std::mem::replace(
                { cmd("ACL").arg("SETUSER").arg(username).arg(rules) },
                Cmd::new(),
            )
        }
        /// Delete all the specified ACL users and terminate all the connections
        /// that are authenticated with such users.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_deluser<'a, K: ToRedisArgs>(usernames: &'a [K]) -> Self {
            ::std::mem::replace({ cmd("ACL").arg("DELUSER").arg(usernames) }, Cmd::new())
        }
        /// Simulate the execution of a given command by a given user.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_dryrun<'a, K: ToRedisArgs, C: ToRedisArgs, A: ToRedisArgs>(
            username: K,
            command: C,
            args: A,
        ) -> Self {
            ::std::mem::replace(
                { cmd("ACL").arg("DRYRUN").arg(username).arg(command).arg(args) },
                Cmd::new(),
            )
        }
        /// Shows the available ACL categories.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_cat<'a>() -> Self {
            ::std::mem::replace({ cmd("ACL").arg("CAT") }, Cmd::new())
        }
        /// Shows all the Redis commands in the specified category.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_cat_categoryname<'a, K: ToRedisArgs>(categoryname: K) -> Self {
            ::std::mem::replace({ cmd("ACL").arg("CAT").arg(categoryname) }, Cmd::new())
        }
        /// Generates a 256-bits password starting from /dev/urandom if available.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_genpass<'a>() -> Self {
            ::std::mem::replace({ cmd("ACL").arg("GENPASS") }, Cmd::new())
        }
        /// Generates a 1-to-1024-bits password starting from /dev/urandom if available.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_genpass_bits<'a>(bits: isize) -> Self {
            ::std::mem::replace({ cmd("ACL").arg("GENPASS").arg(bits) }, Cmd::new())
        }
        /// Returns the username the current connection is authenticated with.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_whoami<'a>() -> Self {
            ::std::mem::replace({ cmd("ACL").arg("WHOAMI") }, Cmd::new())
        }
        /// Shows a list of recent ACL security events
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_log<'a>(count: isize) -> Self {
            ::std::mem::replace({ cmd("ACL").arg("LOG").arg(count) }, Cmd::new())
        }
        /// Clears the ACL log.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_log_reset<'a>() -> Self {
            ::std::mem::replace({ cmd("ACL").arg("LOG").arg("RESET") }, Cmd::new())
        }
        /// Returns a helpful text describing the different subcommands.
        #[cfg(feature = "acl")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_help<'a>() -> Self {
            ::std::mem::replace({ cmd("ACL").arg("HELP") }, Cmd::new())
        }
        /// Adds the specified geospatial items to the specified key.
        ///
        /// Every member has to be written as a tuple of `(longitude, latitude,
        /// member_name)`. It can be a single tuple, or a vector of tuples.
        ///
        /// `longitude, latitude` can be set using [redis::geo::Coord][1].
        ///
        /// [1]: ./geo/struct.Coord.html
        ///
        /// Returns the number of elements added to the sorted set, not including
        /// elements already existing for which the score was updated.
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, Connection, RedisResult};
        /// use redis::geo::Coord;
        ///
        /// fn add_point(con: &mut Connection) -> RedisResult<isize> {
        ///     con.geo_add("my_gis", (Coord::lon_lat(13.361389, 38.115556), "Palermo"))
        /// }
        ///
        /// fn add_point_with_tuples(con: &mut Connection) -> RedisResult<isize> {
        ///     con.geo_add("my_gis", ("13.361389", "38.115556", "Palermo"))
        /// }
        ///
        /// fn add_many_points(con: &mut Connection) -> RedisResult<isize> {
        ///     con.geo_add("my_gis", &[
        ///         ("13.361389", "38.115556", "Palermo"),
        ///         ("15.087269", "37.502669", "Catania")
        ///     ])
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_add<'a, K: ToRedisArgs, M: ToRedisArgs>(key: K, members: M) -> Self {
            ::std::mem::replace({ cmd("GEOADD").arg(key).arg(members) }, Cmd::new())
        }
        /// Return the distance between two members in the geospatial index
        /// represented by the sorted set.
        ///
        /// If one or both the members are missing, the command returns NULL, so
        /// it may be convenient to parse its response as either `Option<f64>` or
        /// `Option<String>`.
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        /// use redis::geo::Unit;
        ///
        /// fn get_dists(con: &mut redis::Connection) {
        ///     let x: RedisResult<f64> = con.geo_dist(
        ///         "my_gis",
        ///         "Palermo",
        ///         "Catania",
        ///         Unit::Kilometers
        ///     );
        ///     // x is Ok(166.2742)
        ///
        ///     let x: RedisResult<Option<f64>> = con.geo_dist(
        ///         "my_gis",
        ///         "Palermo",
        ///         "Atlantis",
        ///         Unit::Meters
        ///     );
        ///     // x is Ok(None)
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_dist<'a, K: ToRedisArgs, M1: ToRedisArgs, M2: ToRedisArgs>(
            key: K,
            member1: M1,
            member2: M2,
            unit: geo::Unit,
        ) -> Self {
            ::std::mem::replace(
                { cmd("GEODIST").arg(key).arg(member1).arg(member2).arg(unit) },
                Cmd::new(),
            )
        }
        /// Return valid [Geohash][1] strings representing the position of one or
        /// more members of the geospatial index represented by the sorted set at
        /// key.
        ///
        /// [1]: https://en.wikipedia.org/wiki/Geohash
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        ///
        /// fn get_hash(con: &mut redis::Connection) {
        ///     let x: RedisResult<Vec<String>> = con.geo_hash("my_gis", "Palermo");
        ///     // x is vec!["sqc8b49rny0"]
        ///
        ///     let x: RedisResult<Vec<String>> = con.geo_hash("my_gis", &["Palermo", "Catania"]);
        ///     // x is vec!["sqc8b49rny0", "sqdtr74hyu0"]
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_hash<'a, K: ToRedisArgs, M: ToRedisArgs>(key: K, members: M) -> Self {
            ::std::mem::replace({ cmd("GEOHASH").arg(key).arg(members) }, Cmd::new())
        }
        /// Return the positions of all the specified members of the geospatial
        /// index represented by the sorted set at key.
        ///
        /// Every position is a pair of `(longitude, latitude)`. [redis::geo::Coord][1]
        /// can be used to convert these value in a struct.
        ///
        /// [1]: ./geo/struct.Coord.html
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        /// use redis::geo::Coord;
        ///
        /// fn get_position(con: &mut redis::Connection) {
        ///     let x: RedisResult<Vec<Vec<f64>>> = con.geo_pos("my_gis", &["Palermo", "Catania"]);
        ///     // x is [ [ 13.361389, 38.115556 ], [ 15.087269, 37.502669 ] ];
        ///
        ///     let x: Vec<Coord<f64>> = con.geo_pos("my_gis", "Palermo").unwrap();
        ///     // x[0].longitude is 13.361389
        ///     // x[0].latitude is 38.115556
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_pos<'a, K: ToRedisArgs, M: ToRedisArgs>(key: K, members: M) -> Self {
            ::std::mem::replace({ cmd("GEOPOS").arg(key).arg(members) }, Cmd::new())
        }
        /// Return the members of a sorted set populated with geospatial information
        /// using [geo_add](#method.geo_add), which are within the borders of the area
        /// specified with the center location and the maximum distance from the center
        /// (the radius).
        ///
        /// Every item in the result can be read with [redis::geo::RadiusSearchResult][1],
        /// which support the multiple formats returned by `GEORADIUS`.
        ///
        /// [1]: ./geo/struct.RadiusSearchResult.html
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        /// use redis::geo::{RadiusOptions, RadiusSearchResult, RadiusOrder, Unit};
        ///
        /// fn radius(con: &mut redis::Connection) -> Vec<RadiusSearchResult> {
        ///     let opts = RadiusOptions::default().with_dist().order(RadiusOrder::Asc);
        ///     con.geo_radius("my_gis", 15.90, 37.21, 51.39, Unit::Kilometers, opts).unwrap()
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_radius<'a, K: ToRedisArgs>(
            key: K,
            longitude: f64,
            latitude: f64,
            radius: f64,
            unit: geo::Unit,
            options: geo::RadiusOptions,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("GEORADIUS")
                        .arg(key)
                        .arg(longitude)
                        .arg(latitude)
                        .arg(radius)
                        .arg(unit)
                        .arg(options)
                },
                Cmd::new(),
            )
        }
        /// Retrieve members selected by distance with the center of `member`. The
        /// member itself is always contained in the results.
        #[cfg(feature = "geospatial")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_radius_by_member<'a, K: ToRedisArgs, M: ToRedisArgs>(
            key: K,
            member: M,
            radius: f64,
            unit: geo::Unit,
            options: geo::RadiusOptions,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("GEORADIUSBYMEMBER")
                        .arg(key)
                        .arg(member)
                        .arg(radius)
                        .arg(unit)
                        .arg(options)
                },
                Cmd::new(),
            )
        }
        /// Ack pending stream messages checked out by a consumer.
        ///
        /// ```text
        /// XACK <key> <group> <id> <id> ... <id>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xack<'a, K: ToRedisArgs, G: ToRedisArgs, I: ToRedisArgs>(
            key: K,
            group: G,
            ids: &'a [I],
        ) -> Self {
            ::std::mem::replace({ cmd("XACK").arg(key).arg(group).arg(ids) }, Cmd::new())
        }
        /// Add a stream message by `key`. Use `*` as the `id` for the current timestamp.
        ///
        /// ```text
        /// XADD key <ID or *> [field value] [field value] ...
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xadd<'a, K: ToRedisArgs, ID: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs>(
            key: K,
            id: ID,
            items: &'a [(F, V)],
        ) -> Self {
            ::std::mem::replace({ cmd("XADD").arg(key).arg(id).arg(items) }, Cmd::new())
        }
        /// BTreeMap variant for adding a stream message by `key`.
        /// Use `*` as the `id` for the current timestamp.
        ///
        /// ```text
        /// XADD key <ID or *> [rust BTreeMap] ...
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xadd_map<'a, K: ToRedisArgs, ID: ToRedisArgs, BTM: ToRedisArgs>(
            key: K,
            id: ID,
            map: BTM,
        ) -> Self {
            ::std::mem::replace({ cmd("XADD").arg(key).arg(id).arg(map) }, Cmd::new())
        }
        /// Add a stream message with options.
        ///
        /// Items can be any list type, e.g.
        /// ```rust
        /// // static items
        /// let items = &[("key", "val"), ("key2", "val2")];
        /// # use std::collections::BTreeMap;
        /// // A map (Can be BTreeMap, HashMap, etc)
        /// let mut map: BTreeMap<&str, &str> = BTreeMap::new();
        /// map.insert("ab", "cd");
        /// map.insert("ef", "gh");
        /// map.insert("ij", "kl");
        /// ```
        ///
        /// ```text
        /// XADD key [NOMKSTREAM] [<MAXLEN|MINID> [~|=] threshold [LIMIT count]] <* | ID> field value [field value] ...
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xadd_options<'a, K: ToRedisArgs, ID: ToRedisArgs, I: ToRedisArgs>(
            key: K,
            id: ID,
            items: I,
            options: &'a streams::StreamAddOptions,
        ) -> Self {
            ::std::mem::replace(
                { cmd("XADD").arg(key).arg(options).arg(id).arg(items) },
                Cmd::new(),
            )
        }
        /// Add a stream message while capping the stream at a maxlength.
        ///
        /// ```text
        /// XADD key [MAXLEN [~|=] <count>] <ID or *> [field value] [field value] ...
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xadd_maxlen<
            'a,
            K: ToRedisArgs,
            ID: ToRedisArgs,
            F: ToRedisArgs,
            V: ToRedisArgs,
        >(key: K, maxlen: streams::StreamMaxlen, id: ID, items: &'a [(F, V)]) -> Self {
            ::std::mem::replace(
                { cmd("XADD").arg(key).arg(maxlen).arg(id).arg(items) },
                Cmd::new(),
            )
        }
        /// BTreeMap variant for adding a stream message while capping the stream at a maxlength.
        ///
        /// ```text
        /// XADD key [MAXLEN [~|=] <count>] <ID or *> [rust BTreeMap] ...
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xadd_maxlen_map<'a, K: ToRedisArgs, ID: ToRedisArgs, BTM: ToRedisArgs>(
            key: K,
            maxlen: streams::StreamMaxlen,
            id: ID,
            map: BTM,
        ) -> Self {
            ::std::mem::replace(
                { cmd("XADD").arg(key).arg(maxlen).arg(id).arg(map) },
                Cmd::new(),
            )
        }
        /// Perform a combined xpending and xclaim flow.
        ///
        /// ```no_run
        /// use redis::{Connection,Commands,RedisResult};
        /// use redis::streams::{StreamAutoClaimOptions, StreamAutoClaimReply};
        /// let client = redis::Client::open("redis://127.0.0.1/0").unwrap();
        /// let mut con = client.get_connection().unwrap();
        ///
        /// let opts = StreamAutoClaimOptions::default();
        /// let results : RedisResult<StreamAutoClaimReply> = con.xautoclaim_options("k1", "g1", "c1", 10, "0-0", opts);
        /// ```
        ///
        /// ```text
        /// XAUTOCLAIM <key> <group> <consumer> <min-idle-time> <start> [COUNT <count>] [JUSTID]
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xautoclaim_options<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            C: ToRedisArgs,
            MIT: ToRedisArgs,
            S: ToRedisArgs,
        >(
            key: K,
            group: G,
            consumer: C,
            min_idle_time: MIT,
            start: S,
            options: streams::StreamAutoClaimOptions,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("XAUTOCLAIM")
                        .arg(key)
                        .arg(group)
                        .arg(consumer)
                        .arg(min_idle_time)
                        .arg(start)
                        .arg(options)
                },
                Cmd::new(),
            )
        }
        /// Claim pending, unacked messages, after some period of time,
        /// currently checked out by another consumer.
        ///
        /// This method only accepts the must-have arguments for claiming messages.
        /// If optional arguments are required, see `xclaim_options` below.
        ///
        /// ```text
        /// XCLAIM <key> <group> <consumer> <min-idle-time> [<ID-1> <ID-2>]
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xclaim<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            C: ToRedisArgs,
            MIT: ToRedisArgs,
            ID: ToRedisArgs,
        >(key: K, group: G, consumer: C, min_idle_time: MIT, ids: &'a [ID]) -> Self {
            ::std::mem::replace(
                {
                    cmd("XCLAIM")
                        .arg(key)
                        .arg(group)
                        .arg(consumer)
                        .arg(min_idle_time)
                        .arg(ids)
                },
                Cmd::new(),
            )
        }
        /// This is the optional arguments version for claiming unacked, pending messages
        /// currently checked out by another consumer.
        ///
        /// ```no_run
        /// use redis::{Connection,Commands,RedisResult};
        /// use redis::streams::{StreamClaimOptions,StreamClaimReply};
        /// let client = redis::Client::open("redis://127.0.0.1/0").unwrap();
        /// let mut con = client.get_connection().unwrap();
        ///
        /// // Claim all pending messages for key "k1",
        /// // from group "g1", checked out by consumer "c1"
        /// // for 10ms with RETRYCOUNT 2 and FORCE
        ///
        /// let opts = StreamClaimOptions::default()
        ///     .with_force()
        ///     .retry(2);
        /// let results: RedisResult<StreamClaimReply> =
        ///     con.xclaim_options("k1", "g1", "c1", 10, &["0"], opts);
        ///
        /// // All optional arguments return a `Result<StreamClaimReply>` with one exception:
        /// // Passing JUSTID returns only the message `id` and omits the HashMap for each message.
        ///
        /// let opts = StreamClaimOptions::default()
        ///     .with_justid();
        /// let results: RedisResult<Vec<String>> =
        ///     con.xclaim_options("k1", "g1", "c1", 10, &["0"], opts);
        /// ```
        ///
        /// ```text
        /// XCLAIM <key> <group> <consumer> <min-idle-time> <ID-1> <ID-2>
        ///     [IDLE <milliseconds>] [TIME <mstime>] [RETRYCOUNT <count>]
        ///     [FORCE] [JUSTID] [LASTID <lastid>]
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xclaim_options<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            C: ToRedisArgs,
            MIT: ToRedisArgs,
            ID: ToRedisArgs,
        >(
            key: K,
            group: G,
            consumer: C,
            min_idle_time: MIT,
            ids: &'a [ID],
            options: streams::StreamClaimOptions,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("XCLAIM")
                        .arg(key)
                        .arg(group)
                        .arg(consumer)
                        .arg(min_idle_time)
                        .arg(ids)
                        .arg(options)
                },
                Cmd::new(),
            )
        }
        /// Deletes a list of `id`s for a given stream `key`.
        ///
        /// ```text
        /// XDEL <key> [<ID1> <ID2> ... <IDN>]
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xdel<'a, K: ToRedisArgs, ID: ToRedisArgs>(key: K, ids: &'a [ID]) -> Self {
            ::std::mem::replace({ cmd("XDEL").arg(key).arg(ids) }, Cmd::new())
        }
        /// This command is used for creating a consumer `group`. It expects the stream key
        /// to already exist. Otherwise, use `xgroup_create_mkstream` if it doesn't.
        /// The `id` is the starting message id all consumers should read from. Use `$` If you want
        /// all consumers to read from the last message added to stream.
        ///
        /// ```text
        /// XGROUP CREATE <key> <groupname> <id or $>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_create<'a, K: ToRedisArgs, G: ToRedisArgs, ID: ToRedisArgs>(
            key: K,
            group: G,
            id: ID,
        ) -> Self {
            ::std::mem::replace(
                { cmd("XGROUP").arg("CREATE").arg(key).arg(group).arg(id) },
                Cmd::new(),
            )
        }
        /// This creates a `consumer` explicitly (vs implicit via XREADGROUP)
        /// for given stream `key.
        ///
        /// The return value is either a 0 or a 1 for the number of consumers created
        /// 0 means the consumer already exists
        ///
        /// ```text
        /// XGROUP CREATECONSUMER <key> <groupname> <consumername>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_createconsumer<'a, K: ToRedisArgs, G: ToRedisArgs, C: ToRedisArgs>(
            key: K,
            group: G,
            consumer: C,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd("XGROUP").arg("CREATECONSUMER").arg(key).arg(group).arg(consumer)
                },
                Cmd::new(),
            )
        }
        /// This is the alternate version for creating a consumer `group`
        /// which makes the stream if it doesn't exist.
        ///
        /// ```text
        /// XGROUP CREATE <key> <groupname> <id or $> [MKSTREAM]
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_create_mkstream<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            ID: ToRedisArgs,
        >(key: K, group: G, id: ID) -> Self {
            ::std::mem::replace(
                {
                    cmd("XGROUP")
                        .arg("CREATE")
                        .arg(key)
                        .arg(group)
                        .arg(id)
                        .arg("MKSTREAM")
                },
                Cmd::new(),
            )
        }
        /// Alter which `id` you want consumers to begin reading from an existing
        /// consumer `group`.
        ///
        /// ```text
        /// XGROUP SETID <key> <groupname> <id or $>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_setid<'a, K: ToRedisArgs, G: ToRedisArgs, ID: ToRedisArgs>(
            key: K,
            group: G,
            id: ID,
        ) -> Self {
            ::std::mem::replace(
                { cmd("XGROUP").arg("SETID").arg(key).arg(group).arg(id) },
                Cmd::new(),
            )
        }
        /// Destroy an existing consumer `group` for a given stream `key`
        ///
        /// ```text
        /// XGROUP SETID <key> <groupname> <id or $>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_destroy<'a, K: ToRedisArgs, G: ToRedisArgs>(
            key: K,
            group: G,
        ) -> Self {
            ::std::mem::replace(
                { cmd("XGROUP").arg("DESTROY").arg(key).arg(group) },
                Cmd::new(),
            )
        }
        /// This deletes a `consumer` from an existing consumer `group`
        /// for given stream `key.
        ///
        /// ```text
        /// XGROUP DELCONSUMER <key> <groupname> <consumername>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_delconsumer<'a, K: ToRedisArgs, G: ToRedisArgs, C: ToRedisArgs>(
            key: K,
            group: G,
            consumer: C,
        ) -> Self {
            ::std::mem::replace(
                { cmd("XGROUP").arg("DELCONSUMER").arg(key).arg(group).arg(consumer) },
                Cmd::new(),
            )
        }
        /// This returns all info details about
        /// which consumers have read messages for given consumer `group`.
        /// Take note of the StreamInfoConsumersReply return type.
        ///
        /// *It's possible this return value might not contain new fields
        /// added by Redis in future versions.*
        ///
        /// ```text
        /// XINFO CONSUMERS <key> <group>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xinfo_consumers<'a, K: ToRedisArgs, G: ToRedisArgs>(
            key: K,
            group: G,
        ) -> Self {
            ::std::mem::replace(
                { cmd("XINFO").arg("CONSUMERS").arg(key).arg(group) },
                Cmd::new(),
            )
        }
        /// Returns all consumer `group`s created for a given stream `key`.
        /// Take note of the StreamInfoGroupsReply return type.
        ///
        /// *It's possible this return value might not contain new fields
        /// added by Redis in future versions.*
        ///
        /// ```text
        /// XINFO GROUPS <key>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xinfo_groups<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("XINFO").arg("GROUPS").arg(key) }, Cmd::new())
        }
        /// Returns info about high-level stream details
        /// (first & last message `id`, length, number of groups, etc.)
        /// Take note of the StreamInfoStreamReply return type.
        ///
        /// *It's possible this return value might not contain new fields
        /// added by Redis in future versions.*
        ///
        /// ```text
        /// XINFO STREAM <key>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xinfo_stream<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("XINFO").arg("STREAM").arg(key) }, Cmd::new())
        }
        /// Returns the number of messages for a given stream `key`.
        ///
        /// ```text
        /// XLEN <key>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xlen<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("XLEN").arg(key) }, Cmd::new())
        }
        /// This is a basic version of making XPENDING command calls which only
        /// passes a stream `key` and consumer `group` and it
        /// returns details about which consumers have pending messages
        /// that haven't been acked.
        ///
        /// You can use this method along with
        /// `xclaim` or `xclaim_options` for determining which messages
        /// need to be retried.
        ///
        /// Take note of the StreamPendingReply return type.
        ///
        /// ```text
        /// XPENDING <key> <group> [<start> <stop> <count> [<consumer>]]
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xpending<'a, K: ToRedisArgs, G: ToRedisArgs>(key: K, group: G) -> Self {
            ::std::mem::replace({ cmd("XPENDING").arg(key).arg(group) }, Cmd::new())
        }
        /// This XPENDING version returns a list of all messages over the range.
        /// You can use this for paginating pending messages (but without the message HashMap).
        ///
        /// Start and end follow the same rules `xrange` args. Set start to `-`
        /// and end to `+` for the entire stream.
        ///
        /// Take note of the StreamPendingCountReply return type.
        ///
        /// ```text
        /// XPENDING <key> <group> <start> <stop> <count>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xpending_count<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            S: ToRedisArgs,
            E: ToRedisArgs,
            C: ToRedisArgs,
        >(key: K, group: G, start: S, end: E, count: C) -> Self {
            ::std::mem::replace(
                { cmd("XPENDING").arg(key).arg(group).arg(start).arg(end).arg(count) },
                Cmd::new(),
            )
        }
        /// An alternate version of `xpending_count` which filters by `consumer` name.
        ///
        /// Start and end follow the same rules `xrange` args. Set start to `-`
        /// and end to `+` for the entire stream.
        ///
        /// Take note of the StreamPendingCountReply return type.
        ///
        /// ```text
        /// XPENDING <key> <group> <start> <stop> <count> <consumer>
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xpending_consumer_count<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            S: ToRedisArgs,
            E: ToRedisArgs,
            C: ToRedisArgs,
            CN: ToRedisArgs,
        >(key: K, group: G, start: S, end: E, count: C, consumer: CN) -> Self {
            ::std::mem::replace(
                {
                    cmd("XPENDING")
                        .arg(key)
                        .arg(group)
                        .arg(start)
                        .arg(end)
                        .arg(count)
                        .arg(consumer)
                },
                Cmd::new(),
            )
        }
        /// Returns a range of messages in a given stream `key`.
        ///
        /// Set `start` to `-` to begin at the first message.
        /// Set `end` to `+` to end the most recent message.
        /// You can pass message `id` to both `start` and `end`.
        ///
        /// Take note of the StreamRangeReply return type.
        ///
        /// ```text
        /// XRANGE key start end
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrange<'a, K: ToRedisArgs, S: ToRedisArgs, E: ToRedisArgs>(
            key: K,
            start: S,
            end: E,
        ) -> Self {
            ::std::mem::replace(
                { cmd("XRANGE").arg(key).arg(start).arg(end) },
                Cmd::new(),
            )
        }
        /// A helper method for automatically returning all messages in a stream by `key`.
        /// **Use with caution!**
        ///
        /// ```text
        /// XRANGE key - +
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrange_all<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace({ cmd("XRANGE").arg(key).arg("-").arg("+") }, Cmd::new())
        }
        /// A method for paginating a stream by `key`.
        ///
        /// ```text
        /// XRANGE key start end [COUNT <n>]
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrange_count<
            'a,
            K: ToRedisArgs,
            S: ToRedisArgs,
            E: ToRedisArgs,
            C: ToRedisArgs,
        >(key: K, start: S, end: E, count: C) -> Self {
            ::std::mem::replace(
                { cmd("XRANGE").arg(key).arg(start).arg(end).arg("COUNT").arg(count) },
                Cmd::new(),
            )
        }
        /// Read a list of `id`s for each stream `key`.
        /// This is the basic form of reading streams.
        /// For more advanced control, like blocking, limiting, or reading by consumer `group`,
        /// see `xread_options`.
        ///
        /// ```text
        /// XREAD STREAMS key_1 key_2 ... key_N ID_1 ID_2 ... ID_N
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xread<'a, K: ToRedisArgs, ID: ToRedisArgs>(
            keys: &'a [K],
            ids: &'a [ID],
        ) -> Self {
            ::std::mem::replace(
                { cmd("XREAD").arg("STREAMS").arg(keys).arg(ids) },
                Cmd::new(),
            )
        }
        /// This method handles setting optional arguments for
        /// `XREAD` or `XREADGROUP` Redis commands.
        /// ```no_run
        /// use redis::{Connection,RedisResult,Commands};
        /// use redis::streams::{StreamReadOptions,StreamReadReply};
        /// let client = redis::Client::open("redis://127.0.0.1/0").unwrap();
        /// let mut con = client.get_connection().unwrap();
        ///
        /// // Read 10 messages from the start of the stream,
        /// // without registering as a consumer group.
        ///
        /// let opts = StreamReadOptions::default()
        ///     .count(10);
        /// let results: RedisResult<StreamReadReply> =
        ///     con.xread_options(&["k1"], &["0"], &opts);
        ///
        /// // Read all undelivered messages for a given
        /// // consumer group. Be advised: the consumer group must already
        /// // exist before making this call. Also note: we're passing
        /// // '>' as the id here, which means all undelivered messages.
        ///
        /// let opts = StreamReadOptions::default()
        ///     .group("group-1", "consumer-1");
        /// let results: RedisResult<StreamReadReply> =
        ///     con.xread_options(&["k1"], &[">"], &opts);
        /// ```
        ///
        /// ```text
        /// XREAD [BLOCK <milliseconds>] [COUNT <count>]
        ///     STREAMS key_1 key_2 ... key_N
        ///     ID_1 ID_2 ... ID_N
        ///
        /// XREADGROUP [GROUP group-name consumer-name] [BLOCK <milliseconds>] [COUNT <count>] [NOACK]
        ///     STREAMS key_1 key_2 ... key_N
        ///     ID_1 ID_2 ... ID_N
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xread_options<'a, K: ToRedisArgs, ID: ToRedisArgs>(
            keys: &'a [K],
            ids: &'a [ID],
            options: &'a streams::StreamReadOptions,
        ) -> Self {
            ::std::mem::replace(
                {
                    cmd(if options.read_only() { "XREAD" } else { "XREADGROUP" })
                        .arg(options)
                        .arg("STREAMS")
                        .arg(keys)
                        .arg(ids)
                },
                Cmd::new(),
            )
        }
        /// This is the reverse version of `xrange`.
        /// The same rules apply for `start` and `end` here.
        ///
        /// ```text
        /// XREVRANGE key end start
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrevrange<'a, K: ToRedisArgs, E: ToRedisArgs, S: ToRedisArgs>(
            key: K,
            end: E,
            start: S,
        ) -> Self {
            ::std::mem::replace(
                { cmd("XREVRANGE").arg(key).arg(end).arg(start) },
                Cmd::new(),
            )
        }
        /// This is the reverse version of `xrange_all`.
        /// The same rules apply for `start` and `end` here.
        ///
        /// ```text
        /// XREVRANGE key + -
        /// ```
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrevrange_all<'a, K: ToRedisArgs>(key: K) -> Self {
            ::std::mem::replace(
                { cmd("XREVRANGE").arg(key).arg("+").arg("-") },
                Cmd::new(),
            )
        }
        /// This is the reverse version of `xrange_count`.
        /// The same rules apply for `start` and `end` here.
        ///
        /// ```text
        /// XREVRANGE key end start [COUNT <n>]
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrevrange_count<
            'a,
            K: ToRedisArgs,
            E: ToRedisArgs,
            S: ToRedisArgs,
            C: ToRedisArgs,
        >(key: K, end: E, start: S, count: C) -> Self {
            ::std::mem::replace(
                {
                    cmd("XREVRANGE").arg(key).arg(end).arg(start).arg("COUNT").arg(count)
                },
                Cmd::new(),
            )
        }
        /// Trim a stream `key` to a MAXLEN count.
        ///
        /// ```text
        /// XTRIM <key> MAXLEN [~|=] <count>  (Same as XADD MAXLEN option)
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xtrim<'a, K: ToRedisArgs>(key: K, maxlen: streams::StreamMaxlen) -> Self {
            ::std::mem::replace({ cmd("XTRIM").arg(key).arg(maxlen) }, Cmd::new())
        }
        /// Trim a stream `key` with full options
        ///
        /// ```text
        /// XTRIM <key> <MAXLEN|MINID> [~|=] <threshold> [LIMIT <count>]  (Same as XADD MAXID|MINID options)
        /// ```
        #[cfg(feature = "streams")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xtrim_options<'a, K: ToRedisArgs>(
            key: K,
            options: &'a streams::StreamTrimOptions,
        ) -> Self {
            ::std::mem::replace({ cmd("XTRIM").arg(key).arg(options) }, Cmd::new())
        }
        /// Adds a prepared script command to the pipeline.
        ///
        /// Note: unlike a call to [invoke](crate::ScriptInvocation::invoke), if the script isn't loaded during the pipeline operation,
        /// it will not automatically be loaded and retried. The script can be loaded using the
        /// [load](crate::ScriptInvocation::load) operation.
        /**

# Examples:

```rust,no_run
# fn do_something() -> redis::RedisResult<()> {
# let client = redis::Client::open("redis://127.0.0.1/").unwrap();
# let mut con = client.get_connection().unwrap();
let script = redis::Script::new(r"
    return tonumber(ARGV[1]) + tonumber(ARGV[2]);
");
script.prepare_invoke().load(&mut con)?;
let (a, b): (isize, isize) = redis::pipe()
    .invoke_script(script.arg(1).arg(2))
    .invoke_script(script.arg(2).arg(3))
    .query(&mut con)?;

assert_eq!(a, 3);
assert_eq!(b, 5);
# Ok(()) }
```
*/
        #[cfg(feature = "script")]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn invoke_script<'a>(invocation: &'a crate::ScriptInvocation<'a>) -> Self {
            ::std::mem::replace({ &mut invocation.eval_cmd() }, Cmd::new())
        }
    }
    /// Implements common redis commands for pipelines.  Unlike the regular
    /// commands trait, this returns the pipeline rather than a result
    /// directly.  Other than that it works the same however.
    impl Pipeline {
        /// Get the value of a key.  If key is a vec this becomes an `MGET`.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn get<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd(if key.num_of_args() <= 1 { "GET" } else { "MGET" }).arg(key)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Get values of keys
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn mget<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("MGET").arg(key) }, Cmd::new()))
        }
        /// Gets all keys matching pattern
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn keys<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("KEYS").arg(key) }, Cmd::new()))
        }
        /// Set the string value of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn set<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("SET").arg(key).arg(value) }, Cmd::new()),
            )
        }
        /// Set the string value of a key with options.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn set_options<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
            options: SetOptions,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SET").arg(key).arg(value).arg(options) },
                    Cmd::new(),
                ),
            )
        }
        /// Sets multiple keys to their values.
        #[allow(deprecated)]
        #[deprecated(since = "0.22.4", note = "Renamed to mset() to reflect Redis name")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn set_multiple<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            items: &'a [(K, V)],
        ) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("MSET").arg(items) }, Cmd::new()))
        }
        /// Sets multiple keys to their values.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn mset<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            items: &'a [(K, V)],
        ) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("MSET").arg(items) }, Cmd::new()))
        }
        /// Set the value and expiration of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn set_ex<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
            seconds: u64,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SETEX").arg(key).arg(seconds).arg(value) },
                    Cmd::new(),
                ),
            )
        }
        /// Set the value and expiration in milliseconds of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pset_ex<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
            milliseconds: u64,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("PSETEX").arg(key).arg(milliseconds).arg(value) },
                    Cmd::new(),
                ),
            )
        }
        /// Set the value of a key, only if the key does not exist
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn set_nx<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("SETNX").arg(key).arg(value) }, Cmd::new()),
            )
        }
        /// Sets multiple keys to their values failing if at least one already exists.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn mset_nx<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            items: &'a [(K, V)],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("MSETNX").arg(items) }, Cmd::new()),
            )
        }
        /// Set the string value of a key and return its old value.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn getset<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("GETSET").arg(key).arg(value) }, Cmd::new()),
            )
        }
        /// Get a range of bytes/substring from the value of a key. Negative values provide an offset from the end of the value.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn getrange<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            from: isize,
            to: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("GETRANGE").arg(key).arg(from).arg(to) },
                    Cmd::new(),
                ),
            )
        }
        /// Overwrite the part of the value stored in key at the specified offset.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn setrange<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            offset: isize,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SETRANGE").arg(key).arg(offset).arg(value) },
                    Cmd::new(),
                ),
            )
        }
        /// Delete one or more keys.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn del<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("DEL").arg(key) }, Cmd::new()))
        }
        /// Determine if a key exists.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn exists<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("EXISTS").arg(key) }, Cmd::new()))
        }
        /// Determine the type of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn key_type<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("TYPE").arg(key) }, Cmd::new()))
        }
        /// Set a key's time to live in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn expire<'a, K: ToRedisArgs>(&mut self, key: K, seconds: i64) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("EXPIRE").arg(key).arg(seconds) }, Cmd::new()),
            )
        }
        /// Set the expiration for a key as a UNIX timestamp.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn expire_at<'a, K: ToRedisArgs>(&mut self, key: K, ts: i64) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("EXPIREAT").arg(key).arg(ts) }, Cmd::new()),
            )
        }
        /// Set a key's time to live in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pexpire<'a, K: ToRedisArgs>(&mut self, key: K, ms: i64) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("PEXPIRE").arg(key).arg(ms) }, Cmd::new()),
            )
        }
        /// Set the expiration for a key as a UNIX timestamp in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pexpire_at<'a, K: ToRedisArgs>(&mut self, key: K, ts: i64) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("PEXPIREAT").arg(key).arg(ts) }, Cmd::new()),
            )
        }
        /// Get the absolute Unix expiration timestamp in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn expire_time<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("EXPIRETIME").arg(key) }, Cmd::new()),
            )
        }
        /// Get the absolute Unix expiration timestamp in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pexpire_time<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("PEXPIRETIME").arg(key) }, Cmd::new()),
            )
        }
        /// Remove the expiration from a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn persist<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("PERSIST").arg(key) }, Cmd::new()),
            )
        }
        /// Get the time to live for a key in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn ttl<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("TTL").arg(key) }, Cmd::new()))
        }
        /// Get the time to live for a key in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pttl<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("PTTL").arg(key) }, Cmd::new()))
        }
        /// Get the value of a key and set expiration
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn get_ex<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            expire_at: Expiry,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        let (option, time_arg) = match expire_at {
                            Expiry::EX(sec) => ("EX", Some(sec)),
                            Expiry::PX(ms) => ("PX", Some(ms)),
                            Expiry::EXAT(timestamp_sec) => ("EXAT", Some(timestamp_sec)),
                            Expiry::PXAT(timestamp_ms) => ("PXAT", Some(timestamp_ms)),
                            Expiry::PERSIST => ("PERSIST", None),
                        };
                        cmd("GETEX").arg(key).arg(option).arg(time_arg)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Get the value of a key and delete it
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn get_del<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("GETDEL").arg(key) }, Cmd::new()))
        }
        /// Rename a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rename<'a, K: ToRedisArgs, N: ToRedisArgs>(
            &mut self,
            key: K,
            new_key: N,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("RENAME").arg(key).arg(new_key) }, Cmd::new()),
            )
        }
        /// Rename a key, only if the new key does not exist.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rename_nx<'a, K: ToRedisArgs, N: ToRedisArgs>(
            &mut self,
            key: K,
            new_key: N,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("RENAMENX").arg(key).arg(new_key) },
                    Cmd::new(),
                ),
            )
        }
        /// Unlink one or more keys.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn unlink<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("UNLINK").arg(key) }, Cmd::new()))
        }
        /// Append a value to a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn append<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("APPEND").arg(key).arg(value) }, Cmd::new()),
            )
        }
        /// Increment the numeric value of a key by the given amount.  This
        /// issues a `INCRBY` or `INCRBYFLOAT` depending on the type.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn incr<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            delta: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd(
                                if delta.describe_numeric_behavior()
                                    == NumericBehavior::NumberIsFloat
                                {
                                    "INCRBYFLOAT"
                                } else {
                                    "INCRBY"
                                },
                            )
                            .arg(key)
                            .arg(delta)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Decrement the numeric value of a key by the given amount.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn decr<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            delta: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("DECRBY").arg(key).arg(delta) }, Cmd::new()),
            )
        }
        /// Sets or clears the bit at offset in the string value stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn setbit<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            offset: usize,
            value: bool,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SETBIT").arg(key).arg(offset).arg(i32::from(value)) },
                    Cmd::new(),
                ),
            )
        }
        /// Returns the bit value at offset in the string value stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn getbit<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            offset: usize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("GETBIT").arg(key).arg(offset) }, Cmd::new()),
            )
        }
        /// Count set bits in a string.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bitcount<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("BITCOUNT").arg(key) }, Cmd::new()),
            )
        }
        /// Count set bits in a string in a range.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bitcount_range<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            start: usize,
            end: usize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("BITCOUNT").arg(key).arg(start).arg(end) },
                    Cmd::new(),
                ),
            )
        }
        /// Perform a bitwise AND between multiple keys (containing string values)
        /// and store the result in the destination key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bit_and<'a, D: ToRedisArgs, S: ToRedisArgs>(
            &mut self,
            dstkey: D,
            srckeys: S,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("BITOP").arg("AND").arg(dstkey).arg(srckeys) },
                    Cmd::new(),
                ),
            )
        }
        /// Perform a bitwise OR between multiple keys (containing string values)
        /// and store the result in the destination key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bit_or<'a, D: ToRedisArgs, S: ToRedisArgs>(
            &mut self,
            dstkey: D,
            srckeys: S,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("BITOP").arg("OR").arg(dstkey).arg(srckeys) },
                    Cmd::new(),
                ),
            )
        }
        /// Perform a bitwise XOR between multiple keys (containing string values)
        /// and store the result in the destination key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bit_xor<'a, D: ToRedisArgs, S: ToRedisArgs>(
            &mut self,
            dstkey: D,
            srckeys: S,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("BITOP").arg("XOR").arg(dstkey).arg(srckeys) },
                    Cmd::new(),
                ),
            )
        }
        /// Perform a bitwise NOT of the key (containing string values)
        /// and store the result in the destination key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bit_not<'a, D: ToRedisArgs, S: ToRedisArgs>(
            &mut self,
            dstkey: D,
            srckey: S,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("BITOP").arg("NOT").arg(dstkey).arg(srckey) },
                    Cmd::new(),
                ),
            )
        }
        /// Get the length of the value stored in a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn strlen<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("STRLEN").arg(key) }, Cmd::new()))
        }
        /// Gets a single (or multiple) fields from a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hget<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            field: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd(if field.num_of_args() <= 1 { "HGET" } else { "HMGET" })
                            .arg(key)
                            .arg(field)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Deletes a single (or multiple) fields from a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hdel<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            field: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("HDEL").arg(key).arg(field) }, Cmd::new()),
            )
        }
        /// Sets a single field in a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hset<'a, K: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            field: F,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("HSET").arg(key).arg(field).arg(value) },
                    Cmd::new(),
                ),
            )
        }
        /// Sets a single field in a hash if it does not exist.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hset_nx<'a, K: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            field: F,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("HSETNX").arg(key).arg(field).arg(value) },
                    Cmd::new(),
                ),
            )
        }
        /// Sets multiple fields in a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hset_multiple<'a, K: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            items: &'a [(F, V)],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("HMSET").arg(key).arg(items) }, Cmd::new()),
            )
        }
        /// Increments a value.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hincr<'a, K: ToRedisArgs, F: ToRedisArgs, D: ToRedisArgs>(
            &mut self,
            key: K,
            field: F,
            delta: D,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd(
                                if delta.describe_numeric_behavior()
                                    == NumericBehavior::NumberIsFloat
                                {
                                    "HINCRBYFLOAT"
                                } else {
                                    "HINCRBY"
                                },
                            )
                            .arg(key)
                            .arg(field)
                            .arg(delta)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Checks if a field in a hash exists.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hexists<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            field: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("HEXISTS").arg(key).arg(field) }, Cmd::new()),
            )
        }
        /// Get one or more fields' TTL in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn httl<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            fields: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("HTTL")
                            .arg(key)
                            .arg("FIELDS")
                            .arg(fields.num_of_args())
                            .arg(fields)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Get one or more fields' TTL in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hpttl<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            fields: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("HPTTL")
                            .arg(key)
                            .arg("FIELDS")
                            .arg(fields.num_of_args())
                            .arg(fields)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Set one or more fields' time to live in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hexpire<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            seconds: i64,
            opt: ExpireOption,
            fields: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("HEXPIRE")
                            .arg(key)
                            .arg(seconds)
                            .arg(opt)
                            .arg("FIELDS")
                            .arg(fields.num_of_args())
                            .arg(fields)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Set the expiration for one or more fields as a UNIX timestamp in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hexpire_at<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            ts: i64,
            opt: ExpireOption,
            fields: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("HEXPIREAT")
                            .arg(key)
                            .arg(ts)
                            .arg(opt)
                            .arg("FIELDS")
                            .arg(fields.num_of_args())
                            .arg(fields)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Returns the absolute Unix expiration timestamp in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hexpire_time<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            fields: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("HEXPIRETIME")
                            .arg(key)
                            .arg("FIELDS")
                            .arg(fields.num_of_args())
                            .arg(fields)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Remove the expiration from a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hpersist<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            fields: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("HPERSIST")
                            .arg(key)
                            .arg("FIELDS")
                            .arg(fields.num_of_args())
                            .arg(fields)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Set one or more fields' time to live in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hpexpire<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            milliseconds: i64,
            opt: ExpireOption,
            fields: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("HPEXPIRE")
                            .arg(key)
                            .arg(milliseconds)
                            .arg(opt)
                            .arg("FIELDS")
                            .arg(fields.num_of_args())
                            .arg(fields)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Set the expiration for one or more fields as a UNIX timestamp in milliseconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hpexpire_at<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            ts: i64,
            opt: ExpireOption,
            fields: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("HPEXPIREAT")
                            .arg(key)
                            .arg(ts)
                            .arg(opt)
                            .arg("FIELDS")
                            .arg(fields.num_of_args())
                            .arg(fields)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Returns the absolute Unix expiration timestamp in seconds.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hpexpire_time<'a, K: ToRedisArgs, F: ToRedisArgs>(
            &mut self,
            key: K,
            fields: F,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("HPEXPIRETIME")
                            .arg(key)
                            .arg("FIELDS")
                            .arg(fields.num_of_args())
                            .arg(fields)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Gets all the keys in a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hkeys<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("HKEYS").arg(key) }, Cmd::new()))
        }
        /// Gets all the values in a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hvals<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("HVALS").arg(key) }, Cmd::new()))
        }
        /// Gets all the fields and values in a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hgetall<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("HGETALL").arg(key) }, Cmd::new()),
            )
        }
        /// Gets the length of a hash.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn hlen<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("HLEN").arg(key) }, Cmd::new()))
        }
        /// Pop an element from a list, push it to another list
        /// and return it; or block until one is available
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn blmove<'a, S: ToRedisArgs, D: ToRedisArgs>(
            &mut self,
            srckey: S,
            dstkey: D,
            src_dir: Direction,
            dst_dir: Direction,
            timeout: f64,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("BLMOVE")
                            .arg(srckey)
                            .arg(dstkey)
                            .arg(src_dir)
                            .arg(dst_dir)
                            .arg(timeout)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Pops `count` elements from the first non-empty list key from the list of
        /// provided key names; or blocks until one is available.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn blmpop<'a, K: ToRedisArgs>(
            &mut self,
            timeout: f64,
            numkeys: usize,
            key: K,
            dir: Direction,
            count: usize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("BLMPOP")
                            .arg(timeout)
                            .arg(numkeys)
                            .arg(key)
                            .arg(dir)
                            .arg("COUNT")
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Remove and get the first element in a list, or block until one is available.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn blpop<'a, K: ToRedisArgs>(&mut self, key: K, timeout: f64) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("BLPOP").arg(key).arg(timeout) }, Cmd::new()),
            )
        }
        /// Remove and get the last element in a list, or block until one is available.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn brpop<'a, K: ToRedisArgs>(&mut self, key: K, timeout: f64) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("BRPOP").arg(key).arg(timeout) }, Cmd::new()),
            )
        }
        /// Pop a value from a list, push it to another list and return it;
        /// or block until one is available.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn brpoplpush<'a, S: ToRedisArgs, D: ToRedisArgs>(
            &mut self,
            srckey: S,
            dstkey: D,
            timeout: f64,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("BRPOPLPUSH").arg(srckey).arg(dstkey).arg(timeout) },
                    Cmd::new(),
                ),
            )
        }
        /// Get an element from a list by its index.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lindex<'a, K: ToRedisArgs>(&mut self, key: K, index: isize) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("LINDEX").arg(key).arg(index) }, Cmd::new()),
            )
        }
        /// Insert an element before another element in a list.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn linsert_before<'a, K: ToRedisArgs, P: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            pivot: P,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("LINSERT").arg(key).arg("BEFORE").arg(pivot).arg(value) },
                    Cmd::new(),
                ),
            )
        }
        /// Insert an element after another element in a list.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn linsert_after<'a, K: ToRedisArgs, P: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            pivot: P,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("LINSERT").arg(key).arg("AFTER").arg(pivot).arg(value) },
                    Cmd::new(),
                ),
            )
        }
        /// Returns the length of the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn llen<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("LLEN").arg(key) }, Cmd::new()))
        }
        /// Pop an element a list, push it to another list and return it
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lmove<'a, S: ToRedisArgs, D: ToRedisArgs>(
            &mut self,
            srckey: S,
            dstkey: D,
            src_dir: Direction,
            dst_dir: Direction,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("LMOVE").arg(srckey).arg(dstkey).arg(src_dir).arg(dst_dir) },
                    Cmd::new(),
                ),
            )
        }
        /// Pops `count` elements from the first non-empty list key from the list of
        /// provided key names.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lmpop<'a, K: ToRedisArgs>(
            &mut self,
            numkeys: usize,
            key: K,
            dir: Direction,
            count: usize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("LMPOP")
                            .arg(numkeys)
                            .arg(key)
                            .arg(dir)
                            .arg("COUNT")
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Removes and returns the up to `count` first elements of the list stored at key.
        ///
        /// If `count` is not specified, then defaults to first element.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lpop<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            count: Option<core::num::NonZeroUsize>,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("LPOP").arg(key).arg(count) }, Cmd::new()),
            )
        }
        /// Returns the index of the first matching value of the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lpos<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
            options: LposOptions,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("LPOS").arg(key).arg(value).arg(options) },
                    Cmd::new(),
                ),
            )
        }
        /// Insert all the specified values at the head of the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lpush<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("LPUSH").arg(key).arg(value) }, Cmd::new()),
            )
        }
        /// Inserts a value at the head of the list stored at key, only if key
        /// already exists and holds a list.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lpush_exists<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("LPUSHX").arg(key).arg(value) }, Cmd::new()),
            )
        }
        /// Returns the specified elements of the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lrange<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("LRANGE").arg(key).arg(start).arg(stop) },
                    Cmd::new(),
                ),
            )
        }
        /// Removes the first count occurrences of elements equal to value
        /// from the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lrem<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            count: isize,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("LREM").arg(key).arg(count).arg(value) },
                    Cmd::new(),
                ),
            )
        }
        /// Trim an existing list so that it will contain only the specified
        /// range of elements specified.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn ltrim<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("LTRIM").arg(key).arg(start).arg(stop) },
                    Cmd::new(),
                ),
            )
        }
        /// Sets the list element at index to value
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn lset<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            index: isize,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("LSET").arg(key).arg(index).arg(value) },
                    Cmd::new(),
                ),
            )
        }
        /// Sends a ping to the server
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn ping<'a>(&mut self) -> &mut Self {
            self.add_command(::std::mem::replace({ &mut cmd("PING") }, Cmd::new()))
        }
        /// Sends a ping with a message to the server
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn ping_message<'a, K: ToRedisArgs>(&mut self, message: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("PING").arg(message) }, Cmd::new()),
            )
        }
        /// Removes and returns the up to `count` last elements of the list stored at key
        ///
        /// If `count` is not specified, then defaults to last element.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rpop<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            count: Option<core::num::NonZeroUsize>,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("RPOP").arg(key).arg(count) }, Cmd::new()),
            )
        }
        /// Pop a value from a list, push it to another list and return it.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rpoplpush<'a, K: ToRedisArgs, D: ToRedisArgs>(
            &mut self,
            key: K,
            dstkey: D,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("RPOPLPUSH").arg(key).arg(dstkey) },
                    Cmd::new(),
                ),
            )
        }
        /// Insert all the specified values at the tail of the list stored at key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rpush<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("RPUSH").arg(key).arg(value) }, Cmd::new()),
            )
        }
        /// Inserts value at the tail of the list stored at key, only if key
        /// already exists and holds a list.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn rpush_exists<'a, K: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            value: V,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("RPUSHX").arg(key).arg(value) }, Cmd::new()),
            )
        }
        /// Add one or more members to a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sadd<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            member: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("SADD").arg(key).arg(member) }, Cmd::new()),
            )
        }
        /// Get the number of members in a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn scard<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("SCARD").arg(key) }, Cmd::new()))
        }
        /// Subtract multiple sets.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sdiff<'a, K: ToRedisArgs>(&mut self, keys: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("SDIFF").arg(keys) }, Cmd::new()))
        }
        /// Subtract multiple sets and store the resulting set in a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sdiffstore<'a, D: ToRedisArgs, K: ToRedisArgs>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SDIFFSTORE").arg(dstkey).arg(keys) },
                    Cmd::new(),
                ),
            )
        }
        /// Intersect multiple sets.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sinter<'a, K: ToRedisArgs>(&mut self, keys: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("SINTER").arg(keys) }, Cmd::new()),
            )
        }
        /// Intersect multiple sets and store the resulting set in a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sinterstore<'a, D: ToRedisArgs, K: ToRedisArgs>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SINTERSTORE").arg(dstkey).arg(keys) },
                    Cmd::new(),
                ),
            )
        }
        /// Determine if a given value is a member of a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sismember<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            member: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SISMEMBER").arg(key).arg(member) },
                    Cmd::new(),
                ),
            )
        }
        /// Determine if given values are members of a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn smismember<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            members: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SMISMEMBER").arg(key).arg(members) },
                    Cmd::new(),
                ),
            )
        }
        /// Get all the members in a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn smembers<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("SMEMBERS").arg(key) }, Cmd::new()),
            )
        }
        /// Move a member from one set to another.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn smove<'a, S: ToRedisArgs, D: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            srckey: S,
            dstkey: D,
            member: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SMOVE").arg(srckey).arg(dstkey).arg(member) },
                    Cmd::new(),
                ),
            )
        }
        /// Remove and return a random member from a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn spop<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("SPOP").arg(key) }, Cmd::new()))
        }
        /// Get one random member from a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn srandmember<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("SRANDMEMBER").arg(key) }, Cmd::new()),
            )
        }
        /// Get multiple random members from a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn srandmember_multiple<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            count: usize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SRANDMEMBER").arg(key).arg(count) },
                    Cmd::new(),
                ),
            )
        }
        /// Remove one or more members from a set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn srem<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            member: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("SREM").arg(key).arg(member) }, Cmd::new()),
            )
        }
        /// Add multiple sets.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sunion<'a, K: ToRedisArgs>(&mut self, keys: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("SUNION").arg(keys) }, Cmd::new()),
            )
        }
        /// Add multiple sets and store the resulting set in a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn sunionstore<'a, D: ToRedisArgs, K: ToRedisArgs>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SUNIONSTORE").arg(dstkey).arg(keys) },
                    Cmd::new(),
                ),
            )
        }
        /// Add one member to a sorted set, or update its score if it already exists.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zadd<'a, K: ToRedisArgs, S: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            member: M,
            score: S,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZADD").arg(key).arg(score).arg(member) },
                    Cmd::new(),
                ),
            )
        }
        /// Add multiple members to a sorted set, or update its score if it already exists.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zadd_multiple<'a, K: ToRedisArgs, S: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            items: &'a [(S, M)],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ZADD").arg(key).arg(items) }, Cmd::new()),
            )
        }
        /// Get the number of members in a sorted set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zcard<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("ZCARD").arg(key) }, Cmd::new()))
        }
        /// Count the members in a sorted set with scores within the given values.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zcount<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            &mut self,
            key: K,
            min: M,
            max: MM,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZCOUNT").arg(key).arg(min).arg(max) },
                    Cmd::new(),
                ),
            )
        }
        /// Increments the member in a sorted set at key by delta.
        /// If the member does not exist, it is added with delta as its score.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zincr<'a, K: ToRedisArgs, M: ToRedisArgs, D: ToRedisArgs>(
            &mut self,
            key: K,
            member: M,
            delta: D,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZINCRBY").arg(key).arg(delta).arg(member) },
                    Cmd::new(),
                ),
            )
        }
        /// Intersect multiple sorted sets and store the resulting sorted set in
        /// a new key using SUM as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore<'a, D: ToRedisArgs, K: ToRedisArgs>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZINTERSTORE").arg(dstkey).arg(keys.num_of_args()).arg(keys) },
                    Cmd::new(),
                ),
            )
        }
        /// Intersect multiple sorted sets and store the resulting sorted set in
        /// a new key using MIN as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore_min<'a, D: ToRedisArgs, K: ToRedisArgs>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZINTERSTORE")
                            .arg(dstkey)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("AGGREGATE")
                            .arg("MIN")
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Intersect multiple sorted sets and store the resulting sorted set in
        /// a new key using MAX as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore_max<'a, D: ToRedisArgs, K: ToRedisArgs>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZINTERSTORE")
                            .arg(dstkey)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("AGGREGATE")
                            .arg("MAX")
                    },
                    Cmd::new(),
                ),
            )
        }
        /// [Commands::zinterstore], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore_weights<'a, D: ToRedisArgs, K: ToRedisArgs, W: ToRedisArgs>(
            &mut self,
            dstkey: D,
            keys: &'a [(K, W)],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                            .iter()
                            .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                            .unzip();
                        cmd("ZINTERSTORE")
                            .arg(dstkey)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("WEIGHTS")
                            .arg(weights)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// [Commands::zinterstore_min], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore_min_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
        >(&mut self, dstkey: D, keys: &'a [(K, W)]) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                            .iter()
                            .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                            .unzip();
                        cmd("ZINTERSTORE")
                            .arg(dstkey)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("AGGREGATE")
                            .arg("MIN")
                            .arg("WEIGHTS")
                            .arg(weights)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// [Commands::zinterstore_max], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zinterstore_max_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
        >(&mut self, dstkey: D, keys: &'a [(K, W)]) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                            .iter()
                            .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                            .unzip();
                        cmd("ZINTERSTORE")
                            .arg(dstkey)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("AGGREGATE")
                            .arg("MAX")
                            .arg("WEIGHTS")
                            .arg(weights)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Count the number of members in a sorted set between a given lexicographical range.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zlexcount<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            &mut self,
            key: K,
            min: M,
            max: MM,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZLEXCOUNT").arg(key).arg(min).arg(max) },
                    Cmd::new(),
                ),
            )
        }
        /// Removes and returns the member with the highest score in a sorted set.
        /// Blocks until a member is available otherwise.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bzpopmax<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            timeout: f64,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("BZPOPMAX").arg(key).arg(timeout) },
                    Cmd::new(),
                ),
            )
        }
        /// Removes and returns up to count members with the highest scores in a sorted set
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zpopmax<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            count: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ZPOPMAX").arg(key).arg(count) }, Cmd::new()),
            )
        }
        /// Removes and returns the member with the lowest score in a sorted set.
        /// Blocks until a member is available otherwise.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bzpopmin<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            timeout: f64,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("BZPOPMIN").arg(key).arg(timeout) },
                    Cmd::new(),
                ),
            )
        }
        /// Removes and returns up to count members with the lowest scores in a sorted set
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zpopmin<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            count: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ZPOPMIN").arg(key).arg(count) }, Cmd::new()),
            )
        }
        /// Removes and returns up to count members with the highest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        /// Blocks until a member is available otherwise.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bzmpop_max<'a, K: ToRedisArgs>(
            &mut self,
            timeout: f64,
            keys: K,
            count: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("BZMPOP")
                            .arg(timeout)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("MAX")
                            .arg("COUNT")
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Removes and returns up to count members with the highest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zmpop_max<'a, K: ToRedisArgs>(
            &mut self,
            keys: K,
            count: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZMPOP")
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("MAX")
                            .arg("COUNT")
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Removes and returns up to count members with the lowest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        /// Blocks until a member is available otherwise.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn bzmpop_min<'a, K: ToRedisArgs>(
            &mut self,
            timeout: f64,
            keys: K,
            count: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("BZMPOP")
                            .arg(timeout)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("MIN")
                            .arg("COUNT")
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Removes and returns up to count members with the lowest scores,
        /// from the first non-empty sorted set in the provided list of key names.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zmpop_min<'a, K: ToRedisArgs>(
            &mut self,
            keys: K,
            count: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZMPOP")
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("MIN")
                            .arg("COUNT")
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Return up to count random members in a sorted set (or 1 if `count == None`)
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrandmember<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            count: Option<isize>,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZRANDMEMBER").arg(key).arg(count) },
                    Cmd::new(),
                ),
            )
        }
        /// Return up to count random members in a sorted set with scores
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrandmember_withscores<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            count: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZRANDMEMBER").arg(key).arg(count).arg("WITHSCORES") },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by index
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrange<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZRANGE").arg(key).arg(start).arg(stop) },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by index with scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrange_withscores<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZRANGE").arg(key).arg(start).arg(stop).arg("WITHSCORES") },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by lexicographical range.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebylex<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            &mut self,
            key: K,
            min: M,
            max: MM,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZRANGEBYLEX").arg(key).arg(min).arg(max) },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by lexicographical
        /// range with offset and limit.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebylex_limit<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            &mut self,
            key: K,
            min: M,
            max: MM,
            offset: isize,
            count: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZRANGEBYLEX")
                            .arg(key)
                            .arg(min)
                            .arg(max)
                            .arg("LIMIT")
                            .arg(offset)
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by lexicographical range.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebylex<'a, K: ToRedisArgs, MM: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            max: MM,
            min: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZREVRANGEBYLEX").arg(key).arg(max).arg(min) },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by lexicographical
        /// range with offset and limit.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebylex_limit<'a, K: ToRedisArgs, MM: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            max: MM,
            min: M,
            offset: isize,
            count: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZREVRANGEBYLEX")
                            .arg(key)
                            .arg(max)
                            .arg(min)
                            .arg("LIMIT")
                            .arg(offset)
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by score.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebyscore<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            &mut self,
            key: K,
            min: M,
            max: MM,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZRANGEBYSCORE").arg(key).arg(min).arg(max) },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by score with scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebyscore_withscores<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
        >(&mut self, key: K, min: M, max: MM) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZRANGEBYSCORE").arg(key).arg(min).arg(max).arg("WITHSCORES")
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by score with limit.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebyscore_limit<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            &mut self,
            key: K,
            min: M,
            max: MM,
            offset: isize,
            count: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZRANGEBYSCORE")
                            .arg(key)
                            .arg(min)
                            .arg(max)
                            .arg("LIMIT")
                            .arg(offset)
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by score with limit with scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrangebyscore_limit_withscores<
            'a,
            K: ToRedisArgs,
            M: ToRedisArgs,
            MM: ToRedisArgs,
        >(&mut self, key: K, min: M, max: MM, offset: isize, count: isize) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZRANGEBYSCORE")
                            .arg(key)
                            .arg(min)
                            .arg(max)
                            .arg("WITHSCORES")
                            .arg("LIMIT")
                            .arg(offset)
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Determine the index of a member in a sorted set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrank<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            member: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ZRANK").arg(key).arg(member) }, Cmd::new()),
            )
        }
        /// Remove one or more members from a sorted set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrem<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            members: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ZREM").arg(key).arg(members) }, Cmd::new()),
            )
        }
        /// Remove all members in a sorted set between the given lexicographical range.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrembylex<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            &mut self,
            key: K,
            min: M,
            max: MM,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZREMRANGEBYLEX").arg(key).arg(min).arg(max) },
                    Cmd::new(),
                ),
            )
        }
        /// Remove all members in a sorted set within the given indexes.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zremrangebyrank<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZREMRANGEBYRANK").arg(key).arg(start).arg(stop) },
                    Cmd::new(),
                ),
            )
        }
        /// Remove all members in a sorted set within the given scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrembyscore<'a, K: ToRedisArgs, M: ToRedisArgs, MM: ToRedisArgs>(
            &mut self,
            key: K,
            min: M,
            max: MM,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZREMRANGEBYSCORE").arg(key).arg(min).arg(max) },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by index, with scores
        /// ordered from high to low.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrange<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZREVRANGE").arg(key).arg(start).arg(stop) },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by index, with scores
        /// ordered from high to low.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrange_withscores<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            start: isize,
            stop: isize,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZREVRANGE").arg(key).arg(start).arg(stop).arg("WITHSCORES") },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by score.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebyscore<'a, K: ToRedisArgs, MM: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            max: MM,
            min: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZREVRANGEBYSCORE").arg(key).arg(max).arg(min) },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by score with scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebyscore_withscores<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
        >(&mut self, key: K, max: MM, min: M) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZREVRANGEBYSCORE")
                            .arg(key)
                            .arg(max)
                            .arg(min)
                            .arg("WITHSCORES")
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by score with limit.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebyscore_limit<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
        >(&mut self, key: K, max: MM, min: M, offset: isize, count: isize) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZREVRANGEBYSCORE")
                            .arg(key)
                            .arg(max)
                            .arg(min)
                            .arg("LIMIT")
                            .arg(offset)
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Return a range of members in a sorted set, by score with limit with scores.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrangebyscore_limit_withscores<
            'a,
            K: ToRedisArgs,
            MM: ToRedisArgs,
            M: ToRedisArgs,
        >(&mut self, key: K, max: MM, min: M, offset: isize, count: isize) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZREVRANGEBYSCORE")
                            .arg(key)
                            .arg(max)
                            .arg(min)
                            .arg("WITHSCORES")
                            .arg("LIMIT")
                            .arg(offset)
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Determine the index of a member in a sorted set, with scores ordered from high to low.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zrevrank<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            member: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ZREVRANK").arg(key).arg(member) }, Cmd::new()),
            )
        }
        /// Get the score associated with the given member in a sorted set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zscore<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            member: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ZSCORE").arg(key).arg(member) }, Cmd::new()),
            )
        }
        /// Get the scores associated with multiple members in a sorted set.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zscore_multiple<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            members: &'a [M],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ZMSCORE").arg(key).arg(members) }, Cmd::new()),
            )
        }
        /// Unions multiple sorted sets and store the resulting sorted set in
        /// a new key using SUM as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore<'a, D: ToRedisArgs, K: ToRedisArgs>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ZUNIONSTORE").arg(dstkey).arg(keys.num_of_args()).arg(keys) },
                    Cmd::new(),
                ),
            )
        }
        /// Unions multiple sorted sets and store the resulting sorted set in
        /// a new key using MIN as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore_min<'a, D: ToRedisArgs, K: ToRedisArgs>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZUNIONSTORE")
                            .arg(dstkey)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("AGGREGATE")
                            .arg("MIN")
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Unions multiple sorted sets and store the resulting sorted set in
        /// a new key using MAX as aggregation function.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore_max<'a, D: ToRedisArgs, K: ToRedisArgs>(
            &mut self,
            dstkey: D,
            keys: K,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("ZUNIONSTORE")
                            .arg(dstkey)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("AGGREGATE")
                            .arg("MAX")
                    },
                    Cmd::new(),
                ),
            )
        }
        /// [Commands::zunionstore], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore_weights<'a, D: ToRedisArgs, K: ToRedisArgs, W: ToRedisArgs>(
            &mut self,
            dstkey: D,
            keys: &'a [(K, W)],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                            .iter()
                            .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                            .unzip();
                        cmd("ZUNIONSTORE")
                            .arg(dstkey)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("WEIGHTS")
                            .arg(weights)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// [Commands::zunionstore_min], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore_min_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
        >(&mut self, dstkey: D, keys: &'a [(K, W)]) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                            .iter()
                            .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                            .unzip();
                        cmd("ZUNIONSTORE")
                            .arg(dstkey)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("AGGREGATE")
                            .arg("MIN")
                            .arg("WEIGHTS")
                            .arg(weights)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// [Commands::zunionstore_max], but with the ability to specify a
        /// multiplication factor for each sorted set by pairing one with each key
        /// in a tuple.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn zunionstore_max_weights<
            'a,
            D: ToRedisArgs,
            K: ToRedisArgs,
            W: ToRedisArgs,
        >(&mut self, dstkey: D, keys: &'a [(K, W)]) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        let (keys, weights): (Vec<&K>, Vec<&W>) = keys
                            .iter()
                            .map(|(key, weight): &(K, W)| -> (&K, &W) { (key, weight) })
                            .unzip();
                        cmd("ZUNIONSTORE")
                            .arg(dstkey)
                            .arg(keys.num_of_args())
                            .arg(keys)
                            .arg("AGGREGATE")
                            .arg("MAX")
                            .arg("WEIGHTS")
                            .arg(weights)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Adds the specified elements to the specified HyperLogLog.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pfadd<'a, K: ToRedisArgs, E: ToRedisArgs>(
            &mut self,
            key: K,
            element: E,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("PFADD").arg(key).arg(element) }, Cmd::new()),
            )
        }
        /// Return the approximated cardinality of the set(s) observed by the
        /// HyperLogLog at key(s).
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pfcount<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("PFCOUNT").arg(key) }, Cmd::new()),
            )
        }
        /// Merge N different HyperLogLogs into a single one.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn pfmerge<'a, D: ToRedisArgs, S: ToRedisArgs>(
            &mut self,
            dstkey: D,
            srckeys: S,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("PFMERGE").arg(dstkey).arg(srckeys) },
                    Cmd::new(),
                ),
            )
        }
        /// Posts a message to the given channel.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn publish<'a, K: ToRedisArgs, E: ToRedisArgs>(
            &mut self,
            channel: K,
            message: E,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("PUBLISH").arg(channel).arg(message) },
                    Cmd::new(),
                ),
            )
        }
        /// Posts a message to the given sharded channel.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn spublish<'a, K: ToRedisArgs, E: ToRedisArgs>(
            &mut self,
            channel: K,
            message: E,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("SPUBLISH").arg(channel).arg(message) },
                    Cmd::new(),
                ),
            )
        }
        /// Returns the encoding of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn object_encoding<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("OBJECT").arg("ENCODING").arg(key) },
                    Cmd::new(),
                ),
            )
        }
        /// Returns the time in seconds since the last access of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn object_idletime<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("OBJECT").arg("IDLETIME").arg(key) },
                    Cmd::new(),
                ),
            )
        }
        /// Returns the logarithmic access frequency counter of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn object_freq<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("OBJECT").arg("FREQ").arg(key) }, Cmd::new()),
            )
        }
        /// Returns the reference count of a key.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn object_refcount<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("OBJECT").arg("REFCOUNT").arg(key) },
                    Cmd::new(),
                ),
            )
        }
        /// Returns the name of the current connection as set by CLIENT SETNAME.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn client_getname<'a>(&mut self) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("CLIENT").arg("GETNAME") }, Cmd::new()),
            )
        }
        /// Returns the ID of the current connection.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn client_id<'a>(&mut self) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("CLIENT").arg("ID") }, Cmd::new()),
            )
        }
        /// Command assigns a name to the current connection.
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn client_setname<'a, K: ToRedisArgs>(
            &mut self,
            connection_name: K,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("CLIENT").arg("SETNAME").arg(connection_name) },
                    Cmd::new(),
                ),
            )
        }
        /// When Redis is configured to use an ACL file (with the aclfile
        /// configuration option), this command will reload the ACLs from the file,
        /// replacing all the current ACL rules with the ones defined in the file.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_load<'a>(&mut self) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("ACL").arg("LOAD") }, Cmd::new()))
        }
        /// When Redis is configured to use an ACL file (with the aclfile
        /// configuration option), this command will save the currently defined
        /// ACLs from the server memory to the ACL file.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_save<'a>(&mut self) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("ACL").arg("SAVE") }, Cmd::new()))
        }
        /// Shows the currently active ACL rules in the Redis server.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_list<'a>(&mut self) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("ACL").arg("LIST") }, Cmd::new()))
        }
        /// Shows a list of all the usernames of the currently configured users in
        /// the Redis ACL system.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_users<'a>(&mut self) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ACL").arg("USERS") }, Cmd::new()),
            )
        }
        /// Returns all the rules defined for an existing ACL user.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_getuser<'a, K: ToRedisArgs>(&mut self, username: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ACL").arg("GETUSER").arg(username) },
                    Cmd::new(),
                ),
            )
        }
        /// Creates an ACL user without any privilege.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_setuser<'a, K: ToRedisArgs>(&mut self, username: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ACL").arg("SETUSER").arg(username) },
                    Cmd::new(),
                ),
            )
        }
        /// Creates an ACL user with the specified rules or modify the rules of
        /// an existing user.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_setuser_rules<'a, K: ToRedisArgs>(
            &mut self,
            username: K,
            rules: &'a [acl::Rule],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ACL").arg("SETUSER").arg(username).arg(rules) },
                    Cmd::new(),
                ),
            )
        }
        /// Delete all the specified ACL users and terminate all the connections
        /// that are authenticated with such users.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_deluser<'a, K: ToRedisArgs>(
            &mut self,
            usernames: &'a [K],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ACL").arg("DELUSER").arg(usernames) },
                    Cmd::new(),
                ),
            )
        }
        /// Simulate the execution of a given command by a given user.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_dryrun<'a, K: ToRedisArgs, C: ToRedisArgs, A: ToRedisArgs>(
            &mut self,
            username: K,
            command: C,
            args: A,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ACL").arg("DRYRUN").arg(username).arg(command).arg(args) },
                    Cmd::new(),
                ),
            )
        }
        /// Shows the available ACL categories.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_cat<'a>(&mut self) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("ACL").arg("CAT") }, Cmd::new()))
        }
        /// Shows all the Redis commands in the specified category.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_cat_categoryname<'a, K: ToRedisArgs>(
            &mut self,
            categoryname: K,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("ACL").arg("CAT").arg(categoryname) },
                    Cmd::new(),
                ),
            )
        }
        /// Generates a 256-bits password starting from /dev/urandom if available.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_genpass<'a>(&mut self) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ACL").arg("GENPASS") }, Cmd::new()),
            )
        }
        /// Generates a 1-to-1024-bits password starting from /dev/urandom if available.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_genpass_bits<'a>(&mut self, bits: isize) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ACL").arg("GENPASS").arg(bits) }, Cmd::new()),
            )
        }
        /// Returns the username the current connection is authenticated with.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_whoami<'a>(&mut self) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ACL").arg("WHOAMI") }, Cmd::new()),
            )
        }
        /// Shows a list of recent ACL security events
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_log<'a>(&mut self, count: isize) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ACL").arg("LOG").arg(count) }, Cmd::new()),
            )
        }
        /// Clears the ACL log.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_log_reset<'a>(&mut self) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("ACL").arg("LOG").arg("RESET") }, Cmd::new()),
            )
        }
        /// Returns a helpful text describing the different subcommands.
        #[cfg(feature = "acl")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn acl_help<'a>(&mut self) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("ACL").arg("HELP") }, Cmd::new()))
        }
        /// Adds the specified geospatial items to the specified key.
        ///
        /// Every member has to be written as a tuple of `(longitude, latitude,
        /// member_name)`. It can be a single tuple, or a vector of tuples.
        ///
        /// `longitude, latitude` can be set using [redis::geo::Coord][1].
        ///
        /// [1]: ./geo/struct.Coord.html
        ///
        /// Returns the number of elements added to the sorted set, not including
        /// elements already existing for which the score was updated.
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, Connection, RedisResult};
        /// use redis::geo::Coord;
        ///
        /// fn add_point(con: &mut Connection) -> RedisResult<isize> {
        ///     con.geo_add("my_gis", (Coord::lon_lat(13.361389, 38.115556), "Palermo"))
        /// }
        ///
        /// fn add_point_with_tuples(con: &mut Connection) -> RedisResult<isize> {
        ///     con.geo_add("my_gis", ("13.361389", "38.115556", "Palermo"))
        /// }
        ///
        /// fn add_many_points(con: &mut Connection) -> RedisResult<isize> {
        ///     con.geo_add("my_gis", &[
        ///         ("13.361389", "38.115556", "Palermo"),
        ///         ("15.087269", "37.502669", "Catania")
        ///     ])
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_add<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            members: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("GEOADD").arg(key).arg(members) }, Cmd::new()),
            )
        }
        /// Return the distance between two members in the geospatial index
        /// represented by the sorted set.
        ///
        /// If one or both the members are missing, the command returns NULL, so
        /// it may be convenient to parse its response as either `Option<f64>` or
        /// `Option<String>`.
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        /// use redis::geo::Unit;
        ///
        /// fn get_dists(con: &mut redis::Connection) {
        ///     let x: RedisResult<f64> = con.geo_dist(
        ///         "my_gis",
        ///         "Palermo",
        ///         "Catania",
        ///         Unit::Kilometers
        ///     );
        ///     // x is Ok(166.2742)
        ///
        ///     let x: RedisResult<Option<f64>> = con.geo_dist(
        ///         "my_gis",
        ///         "Palermo",
        ///         "Atlantis",
        ///         Unit::Meters
        ///     );
        ///     // x is Ok(None)
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_dist<'a, K: ToRedisArgs, M1: ToRedisArgs, M2: ToRedisArgs>(
            &mut self,
            key: K,
            member1: M1,
            member2: M2,
            unit: geo::Unit,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("GEODIST").arg(key).arg(member1).arg(member2).arg(unit) },
                    Cmd::new(),
                ),
            )
        }
        /// Return valid [Geohash][1] strings representing the position of one or
        /// more members of the geospatial index represented by the sorted set at
        /// key.
        ///
        /// [1]: https://en.wikipedia.org/wiki/Geohash
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        ///
        /// fn get_hash(con: &mut redis::Connection) {
        ///     let x: RedisResult<Vec<String>> = con.geo_hash("my_gis", "Palermo");
        ///     // x is vec!["sqc8b49rny0"]
        ///
        ///     let x: RedisResult<Vec<String>> = con.geo_hash("my_gis", &["Palermo", "Catania"]);
        ///     // x is vec!["sqc8b49rny0", "sqdtr74hyu0"]
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_hash<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            members: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("GEOHASH").arg(key).arg(members) }, Cmd::new()),
            )
        }
        /// Return the positions of all the specified members of the geospatial
        /// index represented by the sorted set at key.
        ///
        /// Every position is a pair of `(longitude, latitude)`. [redis::geo::Coord][1]
        /// can be used to convert these value in a struct.
        ///
        /// [1]: ./geo/struct.Coord.html
        ///
        /// # Example
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        /// use redis::geo::Coord;
        ///
        /// fn get_position(con: &mut redis::Connection) {
        ///     let x: RedisResult<Vec<Vec<f64>>> = con.geo_pos("my_gis", &["Palermo", "Catania"]);
        ///     // x is [ [ 13.361389, 38.115556 ], [ 15.087269, 37.502669 ] ];
        ///
        ///     let x: Vec<Coord<f64>> = con.geo_pos("my_gis", "Palermo").unwrap();
        ///     // x[0].longitude is 13.361389
        ///     // x[0].latitude is 38.115556
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_pos<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            members: M,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("GEOPOS").arg(key).arg(members) }, Cmd::new()),
            )
        }
        /// Return the members of a sorted set populated with geospatial information
        /// using [geo_add](#method.geo_add), which are within the borders of the area
        /// specified with the center location and the maximum distance from the center
        /// (the radius).
        ///
        /// Every item in the result can be read with [redis::geo::RadiusSearchResult][1],
        /// which support the multiple formats returned by `GEORADIUS`.
        ///
        /// [1]: ./geo/struct.RadiusSearchResult.html
        ///
        /// ```rust,no_run
        /// use redis::{Commands, RedisResult};
        /// use redis::geo::{RadiusOptions, RadiusSearchResult, RadiusOrder, Unit};
        ///
        /// fn radius(con: &mut redis::Connection) -> Vec<RadiusSearchResult> {
        ///     let opts = RadiusOptions::default().with_dist().order(RadiusOrder::Asc);
        ///     con.geo_radius("my_gis", 15.90, 37.21, 51.39, Unit::Kilometers, opts).unwrap()
        /// }
        /// ```
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_radius<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            longitude: f64,
            latitude: f64,
            radius: f64,
            unit: geo::Unit,
            options: geo::RadiusOptions,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("GEORADIUS")
                            .arg(key)
                            .arg(longitude)
                            .arg(latitude)
                            .arg(radius)
                            .arg(unit)
                            .arg(options)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Retrieve members selected by distance with the center of `member`. The
        /// member itself is always contained in the results.
        #[cfg(feature = "geospatial")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn geo_radius_by_member<'a, K: ToRedisArgs, M: ToRedisArgs>(
            &mut self,
            key: K,
            member: M,
            radius: f64,
            unit: geo::Unit,
            options: geo::RadiusOptions,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("GEORADIUSBYMEMBER")
                            .arg(key)
                            .arg(member)
                            .arg(radius)
                            .arg(unit)
                            .arg(options)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Ack pending stream messages checked out by a consumer.
        ///
        /// ```text
        /// XACK <key> <group> <id> <id> ... <id>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xack<'a, K: ToRedisArgs, G: ToRedisArgs, I: ToRedisArgs>(
            &mut self,
            key: K,
            group: G,
            ids: &'a [I],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XACK").arg(key).arg(group).arg(ids) },
                    Cmd::new(),
                ),
            )
        }
        /// Add a stream message by `key`. Use `*` as the `id` for the current timestamp.
        ///
        /// ```text
        /// XADD key <ID or *> [field value] [field value] ...
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xadd<'a, K: ToRedisArgs, ID: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs>(
            &mut self,
            key: K,
            id: ID,
            items: &'a [(F, V)],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XADD").arg(key).arg(id).arg(items) },
                    Cmd::new(),
                ),
            )
        }
        /// BTreeMap variant for adding a stream message by `key`.
        /// Use `*` as the `id` for the current timestamp.
        ///
        /// ```text
        /// XADD key <ID or *> [rust BTreeMap] ...
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xadd_map<'a, K: ToRedisArgs, ID: ToRedisArgs, BTM: ToRedisArgs>(
            &mut self,
            key: K,
            id: ID,
            map: BTM,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XADD").arg(key).arg(id).arg(map) },
                    Cmd::new(),
                ),
            )
        }
        /// Add a stream message with options.
        ///
        /// Items can be any list type, e.g.
        /// ```rust
        /// // static items
        /// let items = &[("key", "val"), ("key2", "val2")];
        /// # use std::collections::BTreeMap;
        /// // A map (Can be BTreeMap, HashMap, etc)
        /// let mut map: BTreeMap<&str, &str> = BTreeMap::new();
        /// map.insert("ab", "cd");
        /// map.insert("ef", "gh");
        /// map.insert("ij", "kl");
        /// ```
        ///
        /// ```text
        /// XADD key [NOMKSTREAM] [<MAXLEN|MINID> [~|=] threshold [LIMIT count]] <* | ID> field value [field value] ...
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xadd_options<'a, K: ToRedisArgs, ID: ToRedisArgs, I: ToRedisArgs>(
            &mut self,
            key: K,
            id: ID,
            items: I,
            options: &'a streams::StreamAddOptions,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XADD").arg(key).arg(options).arg(id).arg(items) },
                    Cmd::new(),
                ),
            )
        }
        /// Add a stream message while capping the stream at a maxlength.
        ///
        /// ```text
        /// XADD key [MAXLEN [~|=] <count>] <ID or *> [field value] [field value] ...
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xadd_maxlen<
            'a,
            K: ToRedisArgs,
            ID: ToRedisArgs,
            F: ToRedisArgs,
            V: ToRedisArgs,
        >(
            &mut self,
            key: K,
            maxlen: streams::StreamMaxlen,
            id: ID,
            items: &'a [(F, V)],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XADD").arg(key).arg(maxlen).arg(id).arg(items) },
                    Cmd::new(),
                ),
            )
        }
        /// BTreeMap variant for adding a stream message while capping the stream at a maxlength.
        ///
        /// ```text
        /// XADD key [MAXLEN [~|=] <count>] <ID or *> [rust BTreeMap] ...
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xadd_maxlen_map<'a, K: ToRedisArgs, ID: ToRedisArgs, BTM: ToRedisArgs>(
            &mut self,
            key: K,
            maxlen: streams::StreamMaxlen,
            id: ID,
            map: BTM,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XADD").arg(key).arg(maxlen).arg(id).arg(map) },
                    Cmd::new(),
                ),
            )
        }
        /// Perform a combined xpending and xclaim flow.
        ///
        /// ```no_run
        /// use redis::{Connection,Commands,RedisResult};
        /// use redis::streams::{StreamAutoClaimOptions, StreamAutoClaimReply};
        /// let client = redis::Client::open("redis://127.0.0.1/0").unwrap();
        /// let mut con = client.get_connection().unwrap();
        ///
        /// let opts = StreamAutoClaimOptions::default();
        /// let results : RedisResult<StreamAutoClaimReply> = con.xautoclaim_options("k1", "g1", "c1", 10, "0-0", opts);
        /// ```
        ///
        /// ```text
        /// XAUTOCLAIM <key> <group> <consumer> <min-idle-time> <start> [COUNT <count>] [JUSTID]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xautoclaim_options<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            C: ToRedisArgs,
            MIT: ToRedisArgs,
            S: ToRedisArgs,
        >(
            &mut self,
            key: K,
            group: G,
            consumer: C,
            min_idle_time: MIT,
            start: S,
            options: streams::StreamAutoClaimOptions,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("XAUTOCLAIM")
                            .arg(key)
                            .arg(group)
                            .arg(consumer)
                            .arg(min_idle_time)
                            .arg(start)
                            .arg(options)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Claim pending, unacked messages, after some period of time,
        /// currently checked out by another consumer.
        ///
        /// This method only accepts the must-have arguments for claiming messages.
        /// If optional arguments are required, see `xclaim_options` below.
        ///
        /// ```text
        /// XCLAIM <key> <group> <consumer> <min-idle-time> [<ID-1> <ID-2>]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xclaim<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            C: ToRedisArgs,
            MIT: ToRedisArgs,
            ID: ToRedisArgs,
        >(
            &mut self,
            key: K,
            group: G,
            consumer: C,
            min_idle_time: MIT,
            ids: &'a [ID],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("XCLAIM")
                            .arg(key)
                            .arg(group)
                            .arg(consumer)
                            .arg(min_idle_time)
                            .arg(ids)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// This is the optional arguments version for claiming unacked, pending messages
        /// currently checked out by another consumer.
        ///
        /// ```no_run
        /// use redis::{Connection,Commands,RedisResult};
        /// use redis::streams::{StreamClaimOptions,StreamClaimReply};
        /// let client = redis::Client::open("redis://127.0.0.1/0").unwrap();
        /// let mut con = client.get_connection().unwrap();
        ///
        /// // Claim all pending messages for key "k1",
        /// // from group "g1", checked out by consumer "c1"
        /// // for 10ms with RETRYCOUNT 2 and FORCE
        ///
        /// let opts = StreamClaimOptions::default()
        ///     .with_force()
        ///     .retry(2);
        /// let results: RedisResult<StreamClaimReply> =
        ///     con.xclaim_options("k1", "g1", "c1", 10, &["0"], opts);
        ///
        /// // All optional arguments return a `Result<StreamClaimReply>` with one exception:
        /// // Passing JUSTID returns only the message `id` and omits the HashMap for each message.
        ///
        /// let opts = StreamClaimOptions::default()
        ///     .with_justid();
        /// let results: RedisResult<Vec<String>> =
        ///     con.xclaim_options("k1", "g1", "c1", 10, &["0"], opts);
        /// ```
        ///
        /// ```text
        /// XCLAIM <key> <group> <consumer> <min-idle-time> <ID-1> <ID-2>
        ///     [IDLE <milliseconds>] [TIME <mstime>] [RETRYCOUNT <count>]
        ///     [FORCE] [JUSTID] [LASTID <lastid>]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xclaim_options<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            C: ToRedisArgs,
            MIT: ToRedisArgs,
            ID: ToRedisArgs,
        >(
            &mut self,
            key: K,
            group: G,
            consumer: C,
            min_idle_time: MIT,
            ids: &'a [ID],
            options: streams::StreamClaimOptions,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("XCLAIM")
                            .arg(key)
                            .arg(group)
                            .arg(consumer)
                            .arg(min_idle_time)
                            .arg(ids)
                            .arg(options)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Deletes a list of `id`s for a given stream `key`.
        ///
        /// ```text
        /// XDEL <key> [<ID1> <ID2> ... <IDN>]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xdel<'a, K: ToRedisArgs, ID: ToRedisArgs>(
            &mut self,
            key: K,
            ids: &'a [ID],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("XDEL").arg(key).arg(ids) }, Cmd::new()),
            )
        }
        /// This command is used for creating a consumer `group`. It expects the stream key
        /// to already exist. Otherwise, use `xgroup_create_mkstream` if it doesn't.
        /// The `id` is the starting message id all consumers should read from. Use `$` If you want
        /// all consumers to read from the last message added to stream.
        ///
        /// ```text
        /// XGROUP CREATE <key> <groupname> <id or $>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_create<'a, K: ToRedisArgs, G: ToRedisArgs, ID: ToRedisArgs>(
            &mut self,
            key: K,
            group: G,
            id: ID,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XGROUP").arg("CREATE").arg(key).arg(group).arg(id) },
                    Cmd::new(),
                ),
            )
        }
        /// This creates a `consumer` explicitly (vs implicit via XREADGROUP)
        /// for given stream `key.
        ///
        /// The return value is either a 0 or a 1 for the number of consumers created
        /// 0 means the consumer already exists
        ///
        /// ```text
        /// XGROUP CREATECONSUMER <key> <groupname> <consumername>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_createconsumer<'a, K: ToRedisArgs, G: ToRedisArgs, C: ToRedisArgs>(
            &mut self,
            key: K,
            group: G,
            consumer: C,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("XGROUP")
                            .arg("CREATECONSUMER")
                            .arg(key)
                            .arg(group)
                            .arg(consumer)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// This is the alternate version for creating a consumer `group`
        /// which makes the stream if it doesn't exist.
        ///
        /// ```text
        /// XGROUP CREATE <key> <groupname> <id or $> [MKSTREAM]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_create_mkstream<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            ID: ToRedisArgs,
        >(&mut self, key: K, group: G, id: ID) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("XGROUP")
                            .arg("CREATE")
                            .arg(key)
                            .arg(group)
                            .arg(id)
                            .arg("MKSTREAM")
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Alter which `id` you want consumers to begin reading from an existing
        /// consumer `group`.
        ///
        /// ```text
        /// XGROUP SETID <key> <groupname> <id or $>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_setid<'a, K: ToRedisArgs, G: ToRedisArgs, ID: ToRedisArgs>(
            &mut self,
            key: K,
            group: G,
            id: ID,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XGROUP").arg("SETID").arg(key).arg(group).arg(id) },
                    Cmd::new(),
                ),
            )
        }
        /// Destroy an existing consumer `group` for a given stream `key`
        ///
        /// ```text
        /// XGROUP SETID <key> <groupname> <id or $>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_destroy<'a, K: ToRedisArgs, G: ToRedisArgs>(
            &mut self,
            key: K,
            group: G,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XGROUP").arg("DESTROY").arg(key).arg(group) },
                    Cmd::new(),
                ),
            )
        }
        /// This deletes a `consumer` from an existing consumer `group`
        /// for given stream `key.
        ///
        /// ```text
        /// XGROUP DELCONSUMER <key> <groupname> <consumername>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xgroup_delconsumer<'a, K: ToRedisArgs, G: ToRedisArgs, C: ToRedisArgs>(
            &mut self,
            key: K,
            group: G,
            consumer: C,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("XGROUP")
                            .arg("DELCONSUMER")
                            .arg(key)
                            .arg(group)
                            .arg(consumer)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// This returns all info details about
        /// which consumers have read messages for given consumer `group`.
        /// Take note of the StreamInfoConsumersReply return type.
        ///
        /// *It's possible this return value might not contain new fields
        /// added by Redis in future versions.*
        ///
        /// ```text
        /// XINFO CONSUMERS <key> <group>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xinfo_consumers<'a, K: ToRedisArgs, G: ToRedisArgs>(
            &mut self,
            key: K,
            group: G,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XINFO").arg("CONSUMERS").arg(key).arg(group) },
                    Cmd::new(),
                ),
            )
        }
        /// Returns all consumer `group`s created for a given stream `key`.
        /// Take note of the StreamInfoGroupsReply return type.
        ///
        /// *It's possible this return value might not contain new fields
        /// added by Redis in future versions.*
        ///
        /// ```text
        /// XINFO GROUPS <key>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xinfo_groups<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("XINFO").arg("GROUPS").arg(key) }, Cmd::new()),
            )
        }
        /// Returns info about high-level stream details
        /// (first & last message `id`, length, number of groups, etc.)
        /// Take note of the StreamInfoStreamReply return type.
        ///
        /// *It's possible this return value might not contain new fields
        /// added by Redis in future versions.*
        ///
        /// ```text
        /// XINFO STREAM <key>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xinfo_stream<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("XINFO").arg("STREAM").arg(key) }, Cmd::new()),
            )
        }
        /// Returns the number of messages for a given stream `key`.
        ///
        /// ```text
        /// XLEN <key>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xlen<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(::std::mem::replace({ cmd("XLEN").arg(key) }, Cmd::new()))
        }
        /// This is a basic version of making XPENDING command calls which only
        /// passes a stream `key` and consumer `group` and it
        /// returns details about which consumers have pending messages
        /// that haven't been acked.
        ///
        /// You can use this method along with
        /// `xclaim` or `xclaim_options` for determining which messages
        /// need to be retried.
        ///
        /// Take note of the StreamPendingReply return type.
        ///
        /// ```text
        /// XPENDING <key> <group> [<start> <stop> <count> [<consumer>]]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xpending<'a, K: ToRedisArgs, G: ToRedisArgs>(
            &mut self,
            key: K,
            group: G,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("XPENDING").arg(key).arg(group) }, Cmd::new()),
            )
        }
        /// This XPENDING version returns a list of all messages over the range.
        /// You can use this for paginating pending messages (but without the message HashMap).
        ///
        /// Start and end follow the same rules `xrange` args. Set start to `-`
        /// and end to `+` for the entire stream.
        ///
        /// Take note of the StreamPendingCountReply return type.
        ///
        /// ```text
        /// XPENDING <key> <group> <start> <stop> <count>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xpending_count<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            S: ToRedisArgs,
            E: ToRedisArgs,
            C: ToRedisArgs,
        >(&mut self, key: K, group: G, start: S, end: E, count: C) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("XPENDING")
                            .arg(key)
                            .arg(group)
                            .arg(start)
                            .arg(end)
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// An alternate version of `xpending_count` which filters by `consumer` name.
        ///
        /// Start and end follow the same rules `xrange` args. Set start to `-`
        /// and end to `+` for the entire stream.
        ///
        /// Take note of the StreamPendingCountReply return type.
        ///
        /// ```text
        /// XPENDING <key> <group> <start> <stop> <count> <consumer>
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xpending_consumer_count<
            'a,
            K: ToRedisArgs,
            G: ToRedisArgs,
            S: ToRedisArgs,
            E: ToRedisArgs,
            C: ToRedisArgs,
            CN: ToRedisArgs,
        >(
            &mut self,
            key: K,
            group: G,
            start: S,
            end: E,
            count: C,
            consumer: CN,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("XPENDING")
                            .arg(key)
                            .arg(group)
                            .arg(start)
                            .arg(end)
                            .arg(count)
                            .arg(consumer)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Returns a range of messages in a given stream `key`.
        ///
        /// Set `start` to `-` to begin at the first message.
        /// Set `end` to `+` to end the most recent message.
        /// You can pass message `id` to both `start` and `end`.
        ///
        /// Take note of the StreamRangeReply return type.
        ///
        /// ```text
        /// XRANGE key start end
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrange<'a, K: ToRedisArgs, S: ToRedisArgs, E: ToRedisArgs>(
            &mut self,
            key: K,
            start: S,
            end: E,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XRANGE").arg(key).arg(start).arg(end) },
                    Cmd::new(),
                ),
            )
        }
        /// A helper method for automatically returning all messages in a stream by `key`.
        /// **Use with caution!**
        ///
        /// ```text
        /// XRANGE key - +
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrange_all<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XRANGE").arg(key).arg("-").arg("+") },
                    Cmd::new(),
                ),
            )
        }
        /// A method for paginating a stream by `key`.
        ///
        /// ```text
        /// XRANGE key start end [COUNT <n>]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrange_count<
            'a,
            K: ToRedisArgs,
            S: ToRedisArgs,
            E: ToRedisArgs,
            C: ToRedisArgs,
        >(&mut self, key: K, start: S, end: E, count: C) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("XRANGE")
                            .arg(key)
                            .arg(start)
                            .arg(end)
                            .arg("COUNT")
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Read a list of `id`s for each stream `key`.
        /// This is the basic form of reading streams.
        /// For more advanced control, like blocking, limiting, or reading by consumer `group`,
        /// see `xread_options`.
        ///
        /// ```text
        /// XREAD STREAMS key_1 key_2 ... key_N ID_1 ID_2 ... ID_N
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xread<'a, K: ToRedisArgs, ID: ToRedisArgs>(
            &mut self,
            keys: &'a [K],
            ids: &'a [ID],
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XREAD").arg("STREAMS").arg(keys).arg(ids) },
                    Cmd::new(),
                ),
            )
        }
        /// This method handles setting optional arguments for
        /// `XREAD` or `XREADGROUP` Redis commands.
        /// ```no_run
        /// use redis::{Connection,RedisResult,Commands};
        /// use redis::streams::{StreamReadOptions,StreamReadReply};
        /// let client = redis::Client::open("redis://127.0.0.1/0").unwrap();
        /// let mut con = client.get_connection().unwrap();
        ///
        /// // Read 10 messages from the start of the stream,
        /// // without registering as a consumer group.
        ///
        /// let opts = StreamReadOptions::default()
        ///     .count(10);
        /// let results: RedisResult<StreamReadReply> =
        ///     con.xread_options(&["k1"], &["0"], &opts);
        ///
        /// // Read all undelivered messages for a given
        /// // consumer group. Be advised: the consumer group must already
        /// // exist before making this call. Also note: we're passing
        /// // '>' as the id here, which means all undelivered messages.
        ///
        /// let opts = StreamReadOptions::default()
        ///     .group("group-1", "consumer-1");
        /// let results: RedisResult<StreamReadReply> =
        ///     con.xread_options(&["k1"], &[">"], &opts);
        /// ```
        ///
        /// ```text
        /// XREAD [BLOCK <milliseconds>] [COUNT <count>]
        ///     STREAMS key_1 key_2 ... key_N
        ///     ID_1 ID_2 ... ID_N
        ///
        /// XREADGROUP [GROUP group-name consumer-name] [BLOCK <milliseconds>] [COUNT <count>] [NOACK]
        ///     STREAMS key_1 key_2 ... key_N
        ///     ID_1 ID_2 ... ID_N
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xread_options<'a, K: ToRedisArgs, ID: ToRedisArgs>(
            &mut self,
            keys: &'a [K],
            ids: &'a [ID],
            options: &'a streams::StreamReadOptions,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd(if options.read_only() { "XREAD" } else { "XREADGROUP" })
                            .arg(options)
                            .arg("STREAMS")
                            .arg(keys)
                            .arg(ids)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// This is the reverse version of `xrange`.
        /// The same rules apply for `start` and `end` here.
        ///
        /// ```text
        /// XREVRANGE key end start
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrevrange<'a, K: ToRedisArgs, E: ToRedisArgs, S: ToRedisArgs>(
            &mut self,
            key: K,
            end: E,
            start: S,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XREVRANGE").arg(key).arg(end).arg(start) },
                    Cmd::new(),
                ),
            )
        }
        /// This is the reverse version of `xrange_all`.
        /// The same rules apply for `start` and `end` here.
        ///
        /// ```text
        /// XREVRANGE key + -
        /// ```
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrevrange_all<'a, K: ToRedisArgs>(&mut self, key: K) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    { cmd("XREVRANGE").arg(key).arg("+").arg("-") },
                    Cmd::new(),
                ),
            )
        }
        /// This is the reverse version of `xrange_count`.
        /// The same rules apply for `start` and `end` here.
        ///
        /// ```text
        /// XREVRANGE key end start [COUNT <n>]
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xrevrange_count<
            'a,
            K: ToRedisArgs,
            E: ToRedisArgs,
            S: ToRedisArgs,
            C: ToRedisArgs,
        >(&mut self, key: K, end: E, start: S, count: C) -> &mut Self {
            self.add_command(
                ::std::mem::replace(
                    {
                        cmd("XREVRANGE")
                            .arg(key)
                            .arg(end)
                            .arg(start)
                            .arg("COUNT")
                            .arg(count)
                    },
                    Cmd::new(),
                ),
            )
        }
        /// Trim a stream `key` to a MAXLEN count.
        ///
        /// ```text
        /// XTRIM <key> MAXLEN [~|=] <count>  (Same as XADD MAXLEN option)
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xtrim<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            maxlen: streams::StreamMaxlen,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("XTRIM").arg(key).arg(maxlen) }, Cmd::new()),
            )
        }
        /// Trim a stream `key` with full options
        ///
        /// ```text
        /// XTRIM <key> <MAXLEN|MINID> [~|=] <threshold> [LIMIT <count>]  (Same as XADD MAXID|MINID options)
        /// ```
        #[cfg(feature = "streams")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn xtrim_options<'a, K: ToRedisArgs>(
            &mut self,
            key: K,
            options: &'a streams::StreamTrimOptions,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ cmd("XTRIM").arg(key).arg(options) }, Cmd::new()),
            )
        }
        /// Adds a prepared script command to the pipeline.
        ///
        /// Note: unlike a call to [invoke](crate::ScriptInvocation::invoke), if the script isn't loaded during the pipeline operation,
        /// it will not automatically be loaded and retried. The script can be loaded using the
        /// [load](crate::ScriptInvocation::load) operation.
        /**

# Examples:

```rust,no_run
# fn do_something() -> redis::RedisResult<()> {
# let client = redis::Client::open("redis://127.0.0.1/").unwrap();
# let mut con = client.get_connection().unwrap();
let script = redis::Script::new(r"
    return tonumber(ARGV[1]) + tonumber(ARGV[2]);
");
script.prepare_invoke().load(&mut con)?;
let (a, b): (isize, isize) = redis::pipe()
    .invoke_script(script.arg(1).arg(2))
    .invoke_script(script.arg(2).arg(3))
    .query(&mut con)?;

assert_eq!(a, 3);
assert_eq!(b, 5);
# Ok(()) }
```
*/
        #[cfg(feature = "script")]
        #[inline]
        #[allow(clippy::extra_unused_lifetimes, clippy::needless_lifetimes)]
        pub fn invoke_script<'a>(
            &mut self,
            invocation: &'a crate::ScriptInvocation<'a>,
        ) -> &mut Self {
            self.add_command(
                ::std::mem::replace({ &mut invocation.eval_cmd() }, Cmd::new()),
            )
        }
    }
    /// Allows pubsub callbacks to stop receiving messages.
    ///
    /// Arbitrary data may be returned from `Break`.
    pub enum ControlFlow<U> {
        /// Continues.
        Continue,
        /// Breaks with a value.
        Break(U),
    }
    /// The PubSub trait allows subscribing to one or more channels
    /// and receiving a callback whenever a message arrives.
    ///
    /// Each method handles subscribing to the list of keys, waiting for
    /// messages, and unsubscribing from the same list of channels once
    /// a ControlFlow::Break is encountered.
    ///
    /// Once (p)subscribe returns Ok(U), the connection is again safe to use
    /// for calling other methods.
    ///
    /// # Examples
    ///
    /// ```rust,no_run
    /// # fn do_something() -> redis::RedisResult<()> {
    /// use redis::{PubSubCommands, ControlFlow};
    /// let client = redis::Client::open("redis://127.0.0.1/")?;
    /// let mut con = client.get_connection()?;
    /// let mut count = 0;
    /// con.subscribe(&["foo"], |msg| {
    ///     // do something with message
    ///     assert_eq!(msg.get_channel(), Ok(String::from("foo")));
    ///
    ///     // increment messages seen counter
    ///     count += 1;
    ///     match count {
    ///         // stop after receiving 10 messages
    ///         10 => ControlFlow::Break(()),
    ///         _ => ControlFlow::Continue,
    ///     }
    /// })?;
    /// # Ok(()) }
    /// ```
    pub trait PubSubCommands: Sized {
        /// Subscribe to a list of channels using SUBSCRIBE and run the provided
        /// closure for each message received.
        ///
        /// For every `Msg` passed to the provided closure, either
        /// `ControlFlow::Break` or `ControlFlow::Continue` must be returned. This
        /// method will not return until `ControlFlow::Break` is observed.
        fn subscribe<C, F, U>(&mut self, _: C, _: F) -> RedisResult<U>
        where
            F: FnMut(Msg) -> ControlFlow<U>,
            C: ToRedisArgs;
        /// Subscribe to a list of channels using PSUBSCRIBE and run the provided
        /// closure for each message received.
        ///
        /// For every `Msg` passed to the provided closure, either
        /// `ControlFlow::Break` or `ControlFlow::Continue` must be returned. This
        /// method will not return until `ControlFlow::Break` is observed.
        fn psubscribe<P, F, U>(&mut self, _: P, _: F) -> RedisResult<U>
        where
            F: FnMut(Msg) -> ControlFlow<U>,
            P: ToRedisArgs;
    }
    impl<T> Commands for T
    where
        T: ConnectionLike,
    {}
    impl PubSubCommands for Connection {
        fn subscribe<C, F, U>(&mut self, channels: C, mut func: F) -> RedisResult<U>
        where
            F: FnMut(Msg) -> ControlFlow<U>,
            C: ToRedisArgs,
        {
            let mut pubsub = self.as_pubsub();
            pubsub.subscribe(channels)?;
            loop {
                let msg = pubsub.get_message()?;
                match func(msg) {
                    ControlFlow::Continue => continue,
                    ControlFlow::Break(value) => return Ok(value),
                }
            }
        }
        fn psubscribe<P, F, U>(&mut self, patterns: P, mut func: F) -> RedisResult<U>
        where
            F: FnMut(Msg) -> ControlFlow<U>,
            P: ToRedisArgs,
        {
            let mut pubsub = self.as_pubsub();
            pubsub.psubscribe(patterns)?;
            loop {
                let msg = pubsub.get_message()?;
                match func(msg) {
                    ControlFlow::Continue => continue,
                    ControlFlow::Break(value) => return Ok(value),
                }
            }
        }
    }
    /// Options for the [SCAN](https://redis.io/commands/scan) command
    ///
    /// # Example
    ///
    /// ```rust
    /// use redis::{Commands, RedisResult, ScanOptions, Iter};
    /// fn force_fetching_every_matching_key<'a, T: redis::FromRedisValue>(
    ///     con: &'a mut redis::Connection,
    ///     pattern: &'a str,
    ///     count: usize,
    /// ) -> RedisResult<Iter<'a, T>> {
    ///     let opts = ScanOptions::default()
    ///         .with_pattern(pattern)
    ///         .with_count(count);
    ///     con.scan_options(opts)
    /// }
    /// ```
    pub struct ScanOptions {
        pattern: Option<String>,
        count: Option<usize>,
        scan_type: Option<String>,
    }
    #[automatically_derived]
    impl ::core::default::Default for ScanOptions {
        #[inline]
        fn default() -> ScanOptions {
            ScanOptions {
                pattern: ::core::default::Default::default(),
                count: ::core::default::Default::default(),
                scan_type: ::core::default::Default::default(),
            }
        }
    }
    impl ScanOptions {
        /// Limit the results to the first N matching items.
        pub fn with_count(mut self, n: usize) -> Self {
            self.count = Some(n);
            self
        }
        /// Pattern for scan
        pub fn with_pattern(mut self, p: impl Into<String>) -> Self {
            self.pattern = Some(p.into());
            self
        }
        /// Limit the results to those with the given Redis type
        pub fn with_type(mut self, t: impl Into<String>) -> Self {
            self.scan_type = Some(t.into());
            self
        }
    }
    impl ToRedisArgs for ScanOptions {
        fn write_redis_args<W>(&self, out: &mut W)
        where
            W: ?Sized + RedisWrite,
        {
            if let Some(p) = &self.pattern {
                out.write_arg(b"MATCH");
                out.write_arg_fmt(p);
            }
            if let Some(n) = self.count {
                out.write_arg(b"COUNT");
                out.write_arg_fmt(n);
            }
            if let Some(t) = &self.scan_type {
                out.write_arg(b"TYPE");
                out.write_arg_fmt(t);
            }
        }
        fn num_of_args(&self) -> usize {
            let mut len = 0;
            if self.pattern.is_some() {
                len += 2;
            }
            if self.count.is_some() {
                len += 2;
            }
            if self.scan_type.is_some() {
                len += 2;
            }
            len
        }
    }
    /// Options for the [LPOS](https://redis.io/commands/lpos) command
    ///
    /// # Example
    ///
    /// ```rust,no_run
    /// use redis::{Commands, RedisResult, LposOptions};
    /// fn fetch_list_position(
    ///     con: &mut redis::Connection,
    ///     key: &str,
    ///     value: &str,
    ///     count: usize,
    ///     rank: isize,
    ///     maxlen: usize,
    /// ) -> RedisResult<Vec<usize>> {
    ///     let opts = LposOptions::default()
    ///         .count(count)
    ///         .rank(rank)
    ///         .maxlen(maxlen);
    ///     con.lpos(key, value, opts)
    /// }
    /// ```
    pub struct LposOptions {
        count: Option<usize>,
        maxlen: Option<usize>,
        rank: Option<isize>,
    }
    #[automatically_derived]
    impl ::core::default::Default for LposOptions {
        #[inline]
        fn default() -> LposOptions {
            LposOptions {
                count: ::core::default::Default::default(),
                maxlen: ::core::default::Default::default(),
                rank: ::core::default::Default::default(),
            }
        }
    }
    impl LposOptions {
        /// Limit the results to the first N matching items.
        pub fn count(mut self, n: usize) -> Self {
            self.count = Some(n);
            self
        }
        /// Return the value of N from the matching items.
        pub fn rank(mut self, n: isize) -> Self {
            self.rank = Some(n);
            self
        }
        /// Limit the search to N items in the list.
        pub fn maxlen(mut self, n: usize) -> Self {
            self.maxlen = Some(n);
            self
        }
    }
    impl ToRedisArgs for LposOptions {
        fn write_redis_args<W>(&self, out: &mut W)
        where
            W: ?Sized + RedisWrite,
        {
            if let Some(n) = self.count {
                out.write_arg(b"COUNT");
                out.write_arg_fmt(n);
            }
            if let Some(n) = self.rank {
                out.write_arg(b"RANK");
                out.write_arg_fmt(n);
            }
            if let Some(n) = self.maxlen {
                out.write_arg(b"MAXLEN");
                out.write_arg_fmt(n);
            }
        }
        fn num_of_args(&self) -> usize {
            let mut len = 0;
            if self.count.is_some() {
                len += 2;
            }
            if self.rank.is_some() {
                len += 2;
            }
            if self.maxlen.is_some() {
                len += 2;
            }
            len
        }
    }
    /// Enum for the LEFT | RIGHT args used by some commands
    pub enum Direction {
        /// Targets the first element (head) of the list
        Left,
        /// Targets the last element (tail) of the list
        Right,
    }
    impl ToRedisArgs for Direction {
        fn write_redis_args<W>(&self, out: &mut W)
        where
            W: ?Sized + RedisWrite,
        {
            let s: &[u8] = match self {
                Direction::Left => b"LEFT",
                Direction::Right => b"RIGHT",
            };
            out.write_arg(s);
        }
    }
    /// Options for the [SET](https://redis.io/commands/set) command
    ///
    /// # Example
    /// ```rust,no_run
    /// use redis::{Commands, RedisResult, SetOptions, SetExpiry, ExistenceCheck};
    /// fn set_key_value(
    ///     con: &mut redis::Connection,
    ///     key: &str,
    ///     value: &str,
    /// ) -> RedisResult<Vec<usize>> {
    ///     let opts = SetOptions::default()
    ///         .conditional_set(ExistenceCheck::NX)
    ///         .get(true)
    ///         .with_expiration(SetExpiry::EX(60));
    ///     con.set_options(key, value, opts)
    /// }
    /// ```
    pub struct SetOptions {
        conditional_set: Option<ExistenceCheck>,
        get: bool,
        expiration: Option<SetExpiry>,
    }
    #[automatically_derived]
    impl ::core::clone::Clone for SetOptions {
        #[inline]
        fn clone(&self) -> SetOptions {
            let _: ::core::clone::AssertParamIsClone<Option<ExistenceCheck>>;
            let _: ::core::clone::AssertParamIsClone<bool>;
            let _: ::core::clone::AssertParamIsClone<Option<SetExpiry>>;
            *self
        }
    }
    #[automatically_derived]
    impl ::core::marker::Copy for SetOptions {}
    #[automatically_derived]
    impl ::core::default::Default for SetOptions {
        #[inline]
        fn default() -> SetOptions {
            SetOptions {
                conditional_set: ::core::default::Default::default(),
                get: ::core::default::Default::default(),
                expiration: ::core::default::Default::default(),
            }
        }
    }
    impl SetOptions {
        /// Set the existence check for the SET command
        pub fn conditional_set(mut self, existence_check: ExistenceCheck) -> Self {
            self.conditional_set = Some(existence_check);
            self
        }
        /// Set the GET option for the SET command
        pub fn get(mut self, get: bool) -> Self {
            self.get = get;
            self
        }
        /// Set the expiration for the SET command
        pub fn with_expiration(mut self, expiration: SetExpiry) -> Self {
            self.expiration = Some(expiration);
            self
        }
    }
    impl ToRedisArgs for SetOptions {
        fn write_redis_args<W>(&self, out: &mut W)
        where
            W: ?Sized + RedisWrite,
        {
            if let Some(ref conditional_set) = self.conditional_set {
                match conditional_set {
                    ExistenceCheck::NX => {
                        out.write_arg(b"NX");
                    }
                    ExistenceCheck::XX => {
                        out.write_arg(b"XX");
                    }
                }
            }
            if self.get {
                out.write_arg(b"GET");
            }
            if let Some(ref expiration) = self.expiration {
                match expiration {
                    SetExpiry::EX(secs) => {
                        out.write_arg(b"EX");
                        out.write_arg(
                            ::alloc::__export::must_use({
                                    let res = ::alloc::fmt::format(format_args!("{0}", secs));
                                    res
                                })
                                .as_bytes(),
                        );
                    }
                    SetExpiry::PX(millis) => {
                        out.write_arg(b"PX");
                        out.write_arg(
                            ::alloc::__export::must_use({
                                    let res = ::alloc::fmt::format(format_args!("{0}", millis));
                                    res
                                })
                                .as_bytes(),
                        );
                    }
                    SetExpiry::EXAT(unix_time) => {
                        out.write_arg(b"EXAT");
                        out.write_arg(
                            ::alloc::__export::must_use({
                                    let res = ::alloc::fmt::format(
                                        format_args!("{0}", unix_time),
                                    );
                                    res
                                })
                                .as_bytes(),
                        );
                    }
                    SetExpiry::PXAT(unix_time) => {
                        out.write_arg(b"PXAT");
                        out.write_arg(
                            ::alloc::__export::must_use({
                                    let res = ::alloc::fmt::format(
                                        format_args!("{0}", unix_time),
                                    );
                                    res
                                })
                                .as_bytes(),
                        );
                    }
                    SetExpiry::KEEPTTL => {
                        out.write_arg(b"KEEPTTL");
                    }
                }
            }
        }
    }
    /// Creates HELLO command for RESP3 with RedisConnectionInfo
    pub fn resp3_hello(connection_info: &RedisConnectionInfo) -> Cmd {
        let mut hello_cmd = cmd("HELLO");
        hello_cmd.arg("3");
        if let Some(password) = &connection_info.password {
            let username: &str = match connection_info.username.as_ref() {
                None => "default",
                Some(username) => username,
            };
            hello_cmd.arg("AUTH").arg(username).arg(password);
        }
        hello_cmd
    }
}
